:root{
  /* Base tokens (can be overridden by Design System via designBuildCss) */
  --bg: rgba(255,255,255,.06);
  --bg_2: rgba(255,255,255,.50);
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(37, 99, 235, .10);
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --shadow-strong: 0 20px 55px rgba(2, 6, 23, .18);
  --radius: 16px;
  --radius-sm: 12px;
  --ring: 0 0 0 4px rgba(37, 99, 235, .18);

  --accent: #2563eb;
  --accent-2: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --content-max: 980px;
  --header-h: 250px;
  --footer-h: 40px;

  /* "Glass" surfaces used for sticky header/footer */
  --glass: rgba(255,255,255,.78);
  --glass-border: rgba(15, 23, 42, .12);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:rgba(255,255,255,.06);
	--bg_2:rgba(255,255,255,.50);
    --surface:#ffffff;
    --text:#e5e7eb;
    --muted:#94a3b8;
    --border:rgba(226,232,240,.14);
    --shadow: 0 12px 35px rgba(0,0,0,.45);
    --shadow-strong: 0 25px 70px rgba(0,0,0,.55);
    --glass: rgba(12, 18, 34, .78);
    --glass-border: rgba(226,232,240,.12);
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(16,185,129,.10), transparent 55%),
    var(--bg);
}

a{color:var(--accent); text-decoration:none}
a:hover{opacity:.9}

/* ===== Layout (fixed header/footer with centered content width) ===== */
.wrap{
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

.hdr{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--header-h);
  display:flex;
  justify-content:center;
  z-index: 2000;
}

.hdr__inner{
  width: 100%;
  max-width: var(--content-max);
  height: var(--header-h);
  padding: 14px 14px 12px;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-strong);
  border-radius: 0 0 18px 18px;
}

.hdr__row{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:0px 0;}
.hdr__row--menu{justify-content:flex-end}
.hdr__row--status{align-items:flex-start}

.content{
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  padding: 18px 0;
}

.ftr{
  position: fixed;
  left:0; right:0; bottom:0;
  height: var(--footer-h);
  display:flex;
  justify-content:center;
  z-index: 1900;
}
.ftr__inner{
  width: 100%;
  max-width: var(--content-max);
  height: var(--footer-h);
  padding: 0 14px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -16px 45px rgba(2,6,23,.10);
  border-radius: 18px 18px 0 0;
}
.ftr__left,.ftr__right{font-size:12px; font-weight:800; color: rgba(15,23,42,.80)}
@media (prefers-color-scheme: dark){
  .ftr__left,.ftr__right{color: rgba(226,232,240,.85)}
}

@media (max-width: 980px){
  .wrap{padding-left:12px; padding-right:12px;}
}
@media (max-width: 720px){
  .hdr__inner{border-radius:0 0 14px 14px;}
  .ftr__inner{border-radius:14px 14px 0 0;}
}

/* ===== Navigation ===== */
.nav{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.nav__item{position:relative}
.nav__item a{
  #display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 900;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
@media (prefers-color-scheme: dark){
  .nav__item a{background: rgba(255,255,255,.06); box-shadow: 0 12px 25px rgba(0,0,0,.35);margin-bottom: 5px;width: 220px;}
}
.nav__item:hover a{transform: translateY(-1px)}
.nav__item.is-active a{background: var(--text); color:#fff; border-color: var(--text); box-shadow: 0 16px 36px rgba(2,6,23,.18);margin-bottom: 5px;}

.nav__item--hasSub.is-open .nav__sub{display:block;margin-top: -5px;}
.nav__toggle:after{content:'▾'; font-size:12px; opacity:.7;}

.nav__sub{
  display:none;
  position:absolute;
  right:0;
  top: 42px;
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav__subItem{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 850;
}
.nav__subItem:hover{background: rgba(148,163,184,.14)}
.nav__subItem.is-active{background: var(--text); color:#fff}

@media (max-width: 720px){
  .nav{flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px;}
  .nav::-webkit-scrollbar{height:6px;}
  .nav::-webkit-scrollbar-thumb{background: rgba(148,163,184,.35); border-radius: 999px;}
}

/* ===== Branding / Badges ===== */
.brand{display:flex; gap:10px; align-items:center}
.logo{width:var(--logo-size,64px); height:var(--logo-size,64px); border-radius:18px; background: linear-gradient(135deg, var(--text), rgba(148,163,184,.9)); box-shadow: 0 16px 40px rgba(2,6,23,.18)}
.logoImg{width:var(--logo-size,60px); height:var(--logo-size,60px); border-radius:16px; object-fit:cover; display:block}
.brand__title{font-size: var(--header-title-size, 20px); font-weight: 950; letter-spacing: .2px}
.brand__sub{font-size: var(--header-subtitle-size, 12px); color: var(--muted); font-weight: 750}

.mini{font-size:13px; color: var(--text);#margin-top: 10px;}
.mini__1{
  font-size:13px;
  margin-left:auto;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(16,185,129,.12);
  color: var(--text);
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.70);
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}
@media (prefers-color-scheme: dark){
  .pill{background: rgba(255,255,255,.06)}
}
.pill--ok{background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.25)}
.pill--info{background: rgba(37,99,235,.14); border-color: rgba(37,99,235,.25)}
.pill--bad{background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.28)}
.pill--wait{background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.30)}
.pill--disabled,.pill[disabled]{opacity:.45; cursor:not-allowed; pointer-events:none}

/* ===== Cards / Forms / Tables ===== */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.card_1{padding: 0 14px}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.15);
  background: var(--bg);
  color:#fff;
  text-decoration:none;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{transform: translateY(-1px); box-shadow: 0 10px 22px rgba(2,6,23,.10);background: var(--bg_2);}
.btn:focus{outline:none; box-shadow: var(--ring);background: var(--bg_2);}
.btn--ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration:none;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  color: var(--text);
}
@media (prefers-color-scheme: dark){
  .btn--ghost{background: var(--bg)}
}
.btn--danger{background: #991b1b; border-color:#991b1b}
.btn[disabled]{opacity:.55; cursor:not-allowed; pointer-events:none}

.input,.select,textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  color: var(--text);
  font-weight: 700;
  outline:none;
}
@media (prefers-color-scheme: dark){
  .input,.select,textarea{background: rgba(255,255,255,.06)}
}
.input:focus,.select:focus,textarea:focus{box-shadow: var(--ring); border-color: rgba(37,99,235,.35)}

.field{margin: 10px 0}
.label{font-size:12px; font-weight: 900; color: var(--muted); margin-bottom: 6px}

.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.table th,.table td{padding: 10px 10px; border-bottom: 1px solid var(--border); text-align:left; vertical-align: top}
.table th{background: rgba(148,163,184,.10); font-size: 12px; color: var(--muted); font-weight: 950}
.table tr:last-child td{border-bottom:0}

/* ===== Modal (shared) ===== */
.modal-backdrop{position:fixed; inset:0; background: rgba(2,6,23,.35); display:none; align-items:center; justify-content:center; z-index: 4000; padding: 16px}
.modal-backdrop.is-open{display:flex}
.modal{width: min(620px, calc(100vw - 24px)); background: var(--surface); border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-strong)}
.modal__head{display:flex; justify-content:space-between; align-items:center; padding: 12px 14px; border-bottom: 1px solid var(--border)}
.modal__title{margin:0; font-size: 16px; font-weight: 950}
.modal__close{border:none; background:transparent; font-size: 18px; cursor:pointer; color: var(--muted)}
.modal__body{padding: 12px 14px}
.modal__foot{padding: 12px 14px; border-top: 1px solid var(--border); display:flex; justify-content:flex-end; gap: 8px}

/* ===== Undo / Toast ===== */
.undo-toast{
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 3000;
  display:none;
  gap: 10px;
  align-items:flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  max-width: min(720px, calc(100vw - 24px));
}
.undo-toast.is-show{display:flex}

/* ===== Wish Cards (Wishlist + Archive) ===== */
.wish-cards{display:grid; gap:12px; margin-top:10px;}
.wish-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: var(--shadow);
}
.wish-card__top{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.wish-card__meta{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.wish-card__id{font-weight:950}
.wish-card__mid{margin-top:10px; padding:10px; border-radius: 14px; background: rgba(148,163,184,.10); border: 1px solid var(--border)}
.wish-card__title{font-weight: 950; font-size: 15px; line-height: 1.25}
.wish-card__artist{opacity:.92; margin-top:2px}
.wish-card__from{opacity:.75; font-size: 13px; margin-top: 6px}
.wish-card__note{opacity:.9; font-size: 14px; #white-space: pre-wrap; display: inline-flex;align-items: center;gap: 6px;font-size: 14px;background: rgba(239,68,68,.12);border: 1px solid rgba(239,68,68,.22);padding: 0px 10px 0px 0px;border-radius: 5px;}
.wish-card__note_2{opacity:.9; font-size: 14px; #white-space: pre-wrap; display: inline-flex;align-items: center;gap: 6px;font-size: 14px;#background: rgba(239,68,68,.12);#border: 1px solid rgba(239,68,68,.22);padding: 0px 10px 0px 0px;border-radius: 5px;}
.wish-card__actions{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap;}
.wish-card__actions .btn{padding: 8px 10px; border-radius: 10px}

.wish-card__rejectnote{display:inline-flex; align-items:center; gap:6px; font-size: 14px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.22); padding: 0px 10px 0px 0px;; border-radius: 5px}
.wish-card__rejectreason{display:inline-block; padding: 2px 8px; border-radius: 5px; font-size: 13px; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.22)}

/* Blacklist highlights */
.wish-card.is-blacklist-exact{border-color: rgba(239,68,68,.75); box-shadow: 0 0 0 3px rgba(239,68,68,.12), var(--shadow)}
.wish-card.is-blacklist-similar{border-color: rgba(245,158,11,.70); box-shadow: 0 0 0 3px rgba(245,158,11,.12), var(--shadow)}
.wish-card__title.bl-exact,.wish-card__artist.bl-exact{padding: 2px 6px; border-radius: 10px; background: rgba(239,68,68,.14)}
.wish-card__title.bl-similar,.wish-card__artist.bl-similar{padding: 2px 6px; border-radius: 10px; background: rgba(245,158,11,.14)}
.wish-card.is-highlight{box-shadow: 0 0 0 4px rgba(239,68,68,.18), var(--shadow-strong); border-color: rgba(239,68,68,.85)}

/* Tooltip for blacklist hit */
.bl-hit{display:inline-flex; align-items:center; gap:6px; position:relative; outline:none;}
.bl-hit__badge{display:inline-flex; align-items:center; justify-content:center; width: 22px; height: 22px; border-radius: 5px; background: rgba(148,163,184,.14); border: 1px solid var(--border);padding-bottom: 5px;}
.bl-hit__tip{position:absolute; left:-80px; top: calc(100% + 8px); min-width: 220px; max-width: 340px; padding: 10px; border-radius: 14px; background: rgba(2,6,23,.92); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 14px 34px rgba(0,0,0,.45); display:none; z-index: 50; color: #fff}
.bl-hit__tip-title{font-weight: 900; margin-bottom: 8px; color: #fff}
.bl-hit:hover .bl-hit__tip,.bl-hit:focus .bl-hit__tip,.bl-hit:focus-within .bl-hit__tip{display:block;margin-top: -10px;width: 230px;text-align: center;}

/* Reject notice shown in wishbox */
.wb-reject-notice{
  margin: 0 0 10px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.14);
  color: var(--text);
}
.wb-reject-notice__head{display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-weight: 900}
.wb-reject-notice__badge{display:inline-flex; align-items:center; justify-content:center; padding: 4px 10px; border-radius: 999px; background: rgba(239,68,68,.20); border: 1px solid rgba(239,68,68,.30); font-size: 14px}
.wb-reject-notice__meta{font-size: 14px; opacity: .95}
.wb-reject-notice__note{margin-top: 8px; font-size: 14px; opacity: .95; line-height: 1.45; white-space: pre-wrap}
.wb-reject-notice__reason{font-weight: 950}

/* Rating stars */
.stars{position:relative; display:inline-block; font-size: 22px; line-height: 1; letter-spacing: 1px; user-select:none; vertical-align: middle}
.stars__bg{color: rgba(148,163,184,.45)}
.stars__fg{position:absolute; left:0; top:0; overflow:hidden; white-space:nowrap; color: rgba(250,204,21,.95)}

/* Small icon button used in some pages */
.noteIcon{display:inline-flex; align-items:center; justify-content:center; width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border); background: rgba(148,163,184,.14); cursor: help; user-select:none}

/* WB Popup (new wish) – centered card */
.wb-toast{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.wb-toast.is-open{opacity:1; pointer-events:auto;}
.wb-toast__card{
  width: min(420px, 92vw);
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-strong);
  padding: 14px 14px 12px;
  position: relative;
  transform: translateY(8px) scale(.98);
  transition: transform .18s ease;
}
.wb-toast.is-open .wb-toast__card{transform: translateY(0) scale(1)}
.wb-toast__top{display:flex; align-items:center; gap: 12px; padding-right: 160px; margin-bottom: 10px}
.wb-toast__badge{display:inline-flex; align-items:center; justify-content:center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--accent); color:#fff; font-weight: 900; font-size: 12px; letter-spacing: .6px}
.wb-toast__titles{min-width:0}
.wb-toast__title{font-weight: 950}
.wb-toast__subtitle{margin-top:2px; font-size: 13px; color: var(--muted)}
.wb-toast__close{position:absolute; top:10px; right:10px; width: 34px; height: 34px; border-radius: 999px; padding: 0; line-height: 0}
.wb-toast__body{line-height: 1.45; margin-bottom: 10px}
.wb-toast__actions{display:flex; gap: 8px; justify-content:flex-end; flex-wrap:wrap}
.wb-toast__timer{margin-top: 10px; height: 4px; border-radius: 999px; background: rgba(148,163,184,.22); overflow:hidden}
.wb-toast__bar{height: 100%; width: 0%; background: var(--accent); transition-property: width; transition-timing-function: linear}
