  :root {
    --bg:           #f8f6fb;
    --surface:      #ffffff;
    --border:       #e4ddf0;
    --border-light: #efe9f8;
    --text:         #1c1820;
    --text-mid:     #5e5570;
    --text-soft:    #a098b4;
    --lav:          #7c6fa0;
    --lav-deep:     #4e4270;
    --lav-mid:      #a590c8;
    --lav-soft:     #ede8f8;
    --lav-pale:     #f6f3fd;
    --ivory:        #fdfbf7;
    --gold:         #c9b87a;
    --have:         #4a7259;
    --have-bg:      #edf3ef;
    --want:         #6a5a90;
    --want-bg:      #ede8f8;
    --shadow-sm:    0 1px 4px rgba(80,60,120,0.07);
    --shadow-md:    0 8px 30px rgba(80,60,120,0.12);
    --shadow-card:  0 2px 10px rgba(80,60,120,0.08);
    --radius:       14px;
    --radius-sm:    8px;
  }

  body.dark {
    --bg:           #16131e;
    --surface:      #1f1a2e;
    --border:       #2e2645;
    --border-light: #261f3a;
    --text:         #ece8f4;
    --text-mid:     #b0a8c8;
    --text-soft:    #6e6488;
    --lav:          #a590c8;
    --lav-deep:     #c4b0e0;
    --lav-mid:      #c4b0e0;
    --lav-soft:     #2a2240;
    --lav-pale:     #221c36;
    --ivory:        #1a1628;
    --gold:         #d4c48a;
    --have:         #6aaa82;
    --have-bg:      #1a2e22;
    --want:         #a090c8;
    --want-bg:      #221c36;
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.3);
    --shadow-md:    0 8px 30px rgba(0,0,0,0.45);
    --shadow-card:  0 2px 10px rgba(0,0,0,0.3);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg);
    background-image:
      radial-gradient(ellipse at 75% 0%, rgba(124,111,160,0.08) 0%, transparent 55%),
      radial-gradient(ellipse at 10% 100%, rgba(201,184,122,0.07) 0%, transparent 50%);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 28px 20px;
  }

  .window {
    width: 100%; max-width: 1060px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(100,80,150,0.04);
    overflow: hidden;
    display: flex; flex-direction: column;
  }

  /* CHROME */
  .win-chrome {
    background: var(--ivory);
    border-bottom: 1px solid var(--border);
    padding: 9px 14px;
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
  }
  .win-dots { display: flex; gap: 6px; }
  .win-dot  { width: 11px; height: 11px; border-radius: 50%; }
  .win-dot.close { background: #f0827d; }
  .win-dot.min   { background: #f5be4f; }
  .win-dot.max   { background: #62c655; }
  .win-url {
    flex: 1; max-width: 340px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 3px 14px;
    font-size: 11.5px; color: var(--text-soft); text-align: center;
  }
  .win-url span { color: var(--text-mid); }

  /* HEADER BANNER — TCG specific */
  .header-banner {
    width: 100%;
    aspect-ratio: 16/5;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0b8c8 0%, #d97a9c 45%, #8c4a72 100%);
    flex-shrink: 0;
  }
  .header-banner img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
    display: block;
  }
  .header-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(40,15,30,0.1) 0%, rgba(40,15,30,0.15) 40%, rgba(30,10,22,0.88) 100%);
  }
  .header-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 22px 32px;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 20px; z-index: 2;
  }
  .header-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 4.2vw, 44px);
    color: #fff;
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
    display: flex; align-items: center; gap: 14px;
  }
  .header-emoji {
    font-size: 0.85em;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  }
  .header-title span.eyebrow {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.42em;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
  }
  .header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .back-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 6px 13px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    transition: all 0.2s;
    backdrop-filter: blur(4px);
  }
  .back-link:hover { background: rgba(255,255,255,0.18); color: #fff; }

  /* TOPBAR — TCG tabs */
  .topbar {
    background: var(--lav-deep);
    padding: 0 28px;
    display: flex; align-items: center; gap: 16px;
    border-bottom: 2px solid var(--lav);
    flex-shrink: 0;
  }
  .topbar-tabs {
    display: flex; align-items: center; gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
  }
  .topbar-tabs::-webkit-scrollbar { display: none; height: 0; }
  .topbar-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding: 9px 0; }
  .topbar-tab {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,0.55);
    padding: 13px 16px; cursor: pointer; transition: all 0.15s;
    letter-spacing: 0.1px;
    border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
    text-decoration: none; display: block; background: none; border-top: none; border-left: none; border-right: none;
  }
  .topbar-tab:hover { color: rgba(255,255,255,0.85); }
  .topbar-tab.active { color: #fff; border-bottom-color: var(--gold); }

  /* DARK MODE TOGGLE */
  .dark-toggle {
    display: flex; align-items: center; gap: 7px;
    cursor: pointer; padding: 6px 13px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    transition: all 0.2s; user-select: none;
    backdrop-filter: blur(4px);
  }
  .dark-toggle:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
  .toggle-track { width: 30px; height: 16px; background: rgba(255,255,255,0.25); border-radius: 10px; position: relative; transition: background 0.25s; flex-shrink: 0; }
  .toggle-track.on { background: var(--gold); }
  .toggle-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
  .toggle-track.on .toggle-thumb { transform: translateX(14px); }
  .toggle-label { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,0.8); white-space: nowrap; }

  /* BODY */
  .win-body { display: flex; flex: 1; min-height: 560px; }

  /* SIDEBAR — TCG only, no image */
  .sidebar {
    width: 230px; border-right: 1px solid var(--border-light);
    display: flex; flex-direction: column;
    flex-shrink: 0; background: var(--ivory);
  }

  .tcg-info-block { padding: 22px 20px 18px; border-bottom: 1px solid var(--border-light); }
  .tcg-stamp-small {
    width: 100%; height: 56px;
    background: linear-gradient(135deg, #f0b8c8, #d06080);
    border-radius: 10px; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 12px;
  }
  .tcg-info-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px; font-weight: 700; color: var(--text);
    letter-spacing: -0.2px; margin-bottom: 8px;
  }
  .pill-sm {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 10px; border-radius: 20px;
    background: var(--have-bg); color: var(--have);
    margin-bottom: 10px;
  }
  .tcg-info-row {
    font-size: 12.5px; color: var(--text-soft);
    display: flex; align-items: center; gap: 5px;
    margin-bottom: 4px;
  }
  .tcg-info-row span { color: var(--lav); font-weight: 600; }

  .nav-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-soft); padding: 14px 20px 6px;
  }
  .nav-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 20px; font-size: 14px; font-weight: 500; color: var(--text-mid);
    cursor: pointer; transition: all 0.15s; border-left: 3px solid transparent;
    text-decoration: none; background: none; border-top: none; border-right: none; border-bottom: none;
    width: 100%; text-align: left;
  }
  .nav-item:hover { color: var(--text); background: var(--lav-pale); }
  .nav-item.active { color: var(--lav); border-left-color: var(--lav); background: var(--lav-soft); font-weight: 600; }
  .nav-count {
    font-size: 11px; font-weight: 600; color: var(--text-soft); background: var(--bg);
    padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border);
  }
  .nav-item.active .nav-count { background: var(--lav-soft); border-color: var(--lav-mid); color: var(--lav); }

  .sidebar-tags { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--border-light); }
  .tags-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.1px; color: var(--text-soft); margin-bottom: 9px;
  }
  .tag {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 20px;
    margin: 2px 2px; cursor: pointer; transition: opacity 0.15s;
  }
  .tag:hover { opacity: 0.7; }
  .tag.want { background: var(--want-bg); color: var(--want); }
  .tag.have { background: var(--have-bg); color: var(--have); }
  .tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

  /* MAIN */
  .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .main-scroll { flex: 1; padding: 28px 32px 0; overflow-y: auto; }

  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  .section-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 19px; font-weight: 700; color: var(--lav-deep);
    letter-spacing: -0.3px;
    margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
  }
  .section-heading::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

  /* STATS GRID */
  .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 28px; }
  .info-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-card);
  }
  .info-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px; font-weight: 700; color: var(--lav-deep);
    margin-bottom: 16px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
  }

  .level-banner {
    width: 100%; aspect-ratio: 16/7;display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700;
    font-size: 19px; color: rgba(255,255,255,0.9); letter-spacing: 1px; position: relative; overflow: hidden;
  }
  .level-banner::after { content: ''; position: absolute; inset: 0; }
  .level-progress { margin-top: 12px; height: 6px; background: var(--lav-soft); border-radius: 3px; overflow: hidden; }
  .level-progress-bar { height: 100%; background: var(--lav); border-radius: 3px; width: 22%; }
  .level-label { font-size: 12.5px; color: var(--text-soft); margin-top: 8px; }
  .level-label span { color: var(--lav); font-weight: 600; }

  .info-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 14px; }
  .info-key { color: var(--lav-mid); font-weight: 600; min-width: 68px; font-size: 13px; }
  .info-val { color: var(--text-mid); }
  .info-val.ok { color: var(--have); font-weight: 600; }

  .id-card-wrap { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light); display: flex; justify-content: center; }
  .id-card { width: 104px; height: 52px; background: linear-gradient(135deg, #f0b8c8, #d06080); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; }

  .currency-row { display: flex; gap: 24px; align-items: center; }
  .currency-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .currency-icon { font-size: 26px; }
  .currency-amount { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
  .currency-name { font-size: 11px; color: var(--text-soft); }

  .coupon-box { background: var(--bg); border: 1.5px dashed var(--border); border-radius: 8px; padding: 16px; text-align: center; font-size: 13.5px; color: var(--text-soft); font-style: italic; }

  /* Card piles */
  .card-pile { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0 24px; }
  .mini-card { width: 60px; height: 60px; background: var(--lav-soft); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: pointer; transition: all 0.15s; position: relative; }
  .mini-card:hover { border-color: var(--lav); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
  .mini-card .card-label { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--text-soft); white-space: nowrap; display: none; }
  .mini-card:hover .card-label { display: block; }

  .mt { margin-top: 24px; }

  /* Mastered */
  .mastered-grid { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 28px; }
  .mastered-item { width: 76px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; padding: 10px 4px 8px; gap: 5px; font-size: 11px; color: var(--text-soft); transition: all 0.15s; cursor: pointer; }
  .mastered-item:hover { border-color: var(--gold); transform: translateY(-2px); }
  .mastered-icon { font-size: 28px; }
  .mastered-badge { font-size: 9.5px; font-weight: 600; background: #fdf8e8; color: var(--gold); border: 1px solid rgba(201,184,122,0.4); padding: 1px 6px; border-radius: 10px; }

  /* Pending rows */
  .pending-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
  .pending-status { margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; border: 1px solid var(--border); white-space: nowrap; }
  .status-awaiting { background: var(--lav-soft); color: var(--lav); }
  .status-confirmed { background: var(--have-bg); color: var(--have); }

  /* Logs */
  .log-row { font-size: 13.5px; color: var(--text-mid); padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; gap: 14px; align-items: baseline; margin-bottom: 8px; }
  .log-date { color: var(--text-soft); min-width: 95px; font-size: 12px; flex-shrink: 0; font-weight: 500; }

  .window, .sidebar, .main, .topbar, .win-chrome, .footer,
  .info-card, .tcg-info-block, .pending-row, .log-row,
  .nav-item, .mini-card, .sidebar-tags { transition: background 0.3s, border-color 0.3s, color 0.3s; }

  /* FOOTER */
  .footer {
    background: var(--ivory); border-top: 1px solid var(--border);
    padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-shrink: 0;
  }
  .footer-links { display: flex; gap: 18px; }
  .footer-link { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 500; color: var(--text-soft); text-decoration: none; transition: color 0.15s; cursor: pointer; }
  .footer-link:hover { color: var(--lav); }
  .footer-credit { font-size: 12px; color: var(--text-soft); text-align: right; line-height: 1.6; }
  .footer-credit span { color: var(--lav-mid); font-weight: 500; }

  @media (max-width: 760px) {
    .win-body { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); }
    .stats-grid { grid-template-columns: 1fr; }
    .header-content { padding: 16px 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .main-scroll { padding: 22px 18px 0; }
  }
  
  
  
  textarea,
select,
option,
input{
	width: 200px;
	background-color: var(--lav-soft);
	border: none;
	color: var(--text);
	padding:10px;
		transition: all 0.3s;
}
textarea:focus,
select:focus,
option:focus,
input:focus{
	transition: all 0.3s;
}
option{
	width: 100%;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	margin-top: 3px;
}
textarea{
    resize: vertical;
    min-height: 2.5em;
    max-height: 100px;
}
input[type="submit"]{
	width: auto;
	background-color: var(--lav);
	color: var(--text);
}
input[type="submit"]:hover{
	background-color: var(--ivory);
	color: var(--text);
}
.dimmedCard{
	opacity:0.5;
	filter:alpha(opacity=30);
}
  