:root {
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #252a35;
  background: #f5f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --canvas: #f5f6fa;
  --surface: #fff;
  --surface-soft: #f8f8fb;
  --text: #252a35;
  --muted: #9297a4;
  --line: #eff0f4;
  --purple: #7160d8;
  --purple-soft: #f0edff;
  --shadow: 0 9px 26px rgb(33 37 53 / 4%);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--text); font-size: 1rem; line-height: 1.5; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #a79af2; outline-offset: 3px; }
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; width: 244px; flex-direction: column;
  padding: 31px 17px 18px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark { display: grid; width: 36px; height: 36px; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 5px; border-radius: 12px; background: #f0edff; transform: rotate(-5deg); }
.brand-mark span { border-radius: 3px; background: #7665df; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { opacity: .53; }
.brand-mark span:nth-child(4) { background: #e5a48a; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 0.95rem; font-weight: 700; letter-spacing: .02em; }
.brand-copy small { color: #a2a5af; font-size: 0.52rem; letter-spacing: .18em; }
.side-label { margin: 48px 10px 13px; color: #a3a6b1; font-size: 0.66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.category-nav { display: grid; gap: 5px; }
.category-link { display: flex; height: 43px; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #797e8b; cursor: pointer; text-align: left; transition: .2s ease; font-size: 0.8rem; }
.category-link:hover { background: var(--surface-soft); color: var(--text); }
.category-link.active { background: var(--purple-soft); color: var(--purple); font-weight: 600; }
.category-icon { display: grid; width: 19px; height: 19px; place-items: center; }
.category-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.category-link:first-child .category-icon svg, .category-link:nth-child(2) .category-icon svg { fill: currentColor; stroke: none; }
.category-count { margin-left: auto; color: #afb2bc; font-size: 0.72rem; }
.category-link.active .category-count { color: #8a7be0; }
.sidebar-bottom { margin-top: auto; }
.sidebar-note { position: relative; overflow: hidden; min-height: 114px; padding: 17px 16px; border-radius: 12px; background: #f3f0ff; color: #7463d5; }
.note-icon { font-size: 1.06rem; }
.sidebar-note p { position: relative; z-index: 1; margin: 5px 0 0; color: #77718f; font-size: 0.78rem; line-height: 1.7; }
.sidebar-note p strong { color: #5748b2; font-size: 0.9rem; }
.note-orbit { position: absolute; right: -7px; bottom: -28px; width: 91px; height: 91px; border: 1px solid #d9d1ff; border-radius: 50%; }
.orbit-two { right: 8px; bottom: -14px; width: 61px; height: 61px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 18px 5px 0; }
.profile-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #f7ded5; color: #ab6f5f; font-size: 0.82rem; font-weight: 700; }
.profile > span:nth-child(2) { display: grid; gap: 2px; }
.profile strong { font-size: 0.72rem; font-weight: 600; }
.profile small { color: #a3a6b1; font-size: 0.64rem; }
.profile-menu { margin-left: auto; color: #9a9daa; font-size: 1.2rem; }

.main-content {
  width: calc(100% - 244px);
  max-width: none;
  min-height: 100vh;
  margin-left: 244px;
  padding: 0 54px;
}
.topbar { display: flex; height: 75px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9eaf0; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #a0a3ad; font-size: 0.72rem; }
.breadcrumbs strong { color: #585d6a; font-weight: 600; }
.crumb-slash { color: #d0d1d8; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.today-label { color: #898d99; font-size: 0.72rem; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #e9eaf0; border-radius: 10px; background: var(--surface); color: #898d99; cursor: pointer; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }

.welcome-section { position: relative; display: flex; min-height: 208px; align-items: center; overflow: hidden; margin-top: 25px; padding: 28px 40px; border: 1px solid #eeebfa; border-radius: 15px; background: linear-gradient(105deg, #f1efff 0%, #f8f5ff 55%, #fff4ed 100%); }
.welcome-copy { position: relative; z-index: 1; }
.eyebrow, .section-kicker { color: #9388d0; font-size: 0.58rem; font-weight: 700; letter-spacing: .15em; }
.eyebrow { display: flex; align-items: center; gap: 7px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #9a89e7; box-shadow: 0 0 0 3px #e5e0ff; }
.welcome-copy h1 { margin: 13px 0 8px; color: #313243; font-size: clamp(2rem, 2.4vw, 2.2rem); font-weight: 600; letter-spacing: -.045em; }
.welcome-copy h1 span { color: #7264c8; }
.welcome-copy p { margin: 0; color: #8f8d9f; font-size: 0.8rem; }
.welcome-art { position: absolute; top: 0; right: 7%; width: 268px; height: 100%; }
.art-sun { position: absolute; top: 20px; right: 39px; width: 67px; height: 67px; border-radius: 50%; background: #f6dbbc; opacity: .75; }
.art-arch { position: absolute; right: 18px; bottom: 26px; width: 170px; height: 118px; border: 1px solid #e4d8f2; border-bottom: 0; border-radius: 85px 85px 0 0; background: linear-gradient(140deg, rgb(255 255 255 / 55%), rgb(241 224 239 / 40%)); }
.art-table { position: absolute; right: 0; bottom: 25px; width: 229px; height: 2px; background: #d6c6d3; }
.art-mug { position: absolute; right: 79px; bottom: 29px; width: 31px; height: 27px; border-radius: 3px 3px 8px 8px; background: #b7acd9; }
.art-mug span { position: absolute; top: 5px; right: -8px; width: 11px; height: 12px; border: 2px solid #b7acd9; border-left: 0; border-radius: 0 8px 8px 0; }
.art-book { position: absolute; bottom: 28px; left: 52px; width: 43px; height: 8px; border-radius: 2px; background: #e7a991; transform: rotate(-8deg); }
.book-two { bottom: 37px; left: 54px; width: 40px; background: #8e84c8; transform: rotate(4deg); }
.art-plant { position: absolute; z-index: 1; bottom: 27px; left: 23px; width: 25px; height: 49px; }
.art-plant b { position: absolute; bottom: 0; left: 3px; width: 20px; height: 16px; border-radius: 2px 2px 7px 7px; background: #c98d77; }
.art-plant i { position: absolute; bottom: 15px; left: 10px; width: 9px; height: 26px; border-radius: 90% 0 90% 0; background: #8f9b8b; transform: rotate(-22deg); }
.art-plant i:nth-child(2) { left: 2px; height: 22px; transform: rotate(-49deg); }
.art-plant i:nth-child(3) { left: 14px; height: 21px; transform: rotate(27deg) scaleX(-1); }
.plant-right { right: 0; left: auto; bottom: 25px; transform: scale(.7); transform-origin: bottom right; }

.search-section { margin-top: 23px; }
.search-box { display: flex; height: 54px; align-items: center; gap: 13px; padding: 0 8px 0 17px; border: 1px solid #e9eaf0; border-radius: 11px; background: var(--surface); box-shadow: 0 3px 13px rgb(35 36 51 / 2%); transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: #c5bdf0; box-shadow: 0 0 0 3px rgb(113 96 216 / 8%); }
.search-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #a1a4af; stroke-linecap: round; stroke-width: 1.7; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: #afb1bb; }
.search-box kbd { flex: 0 0 auto; padding: 4px 6px; border: 1px solid #ececf1; border-radius: 5px; color: #a6a8b2; font-family: inherit; font-size: 0.6rem; }
.search-submit { height: 36px; flex: 0 0 auto; padding: 0 13px; border: 0; border-radius: 8px; background: #7565d7; color: #fff; cursor: pointer; font-size: 0.72rem; }
.search-submit span { margin-left: 9px; font-size: 0.84rem; }
.search-hint { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: #a6a8b2; font-size: 0.66rem; }
.hint-chip { padding: 4px 9px; border: 1px solid #ececf1; border-radius: 20px; background: var(--surface); color: #858995; cursor: pointer; font-size: 0.66rem; transition: .2s; }
.hint-chip:hover { border-color: #d4cdf5; color: var(--purple); }

.quick-section { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; }
.section-kicker { color: #b1a7dc; font-size: 8px; }
.section-heading h2 { margin: 5px 0 0; font-size: 1.08rem; font-weight: 600; letter-spacing: -.03em; }
.heading-spark { margin-left: 4px; color: #e5ad8f; font-size: 0.9rem; }
.text-button { padding: 0 1px 3px; border: 0; background: transparent; color: #8982bb; cursor: pointer; font-size: 0.68rem; }
.text-button span { margin-left: 5px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.quick-card { position: relative; display: flex; min-width: 0; min-height: 77px; align-items: center; gap: 11px; padding: 13px; border: 1px solid #edecf2; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.quick-card:hover, .site-card:hover { transform: translateY(-2px); border-color: #ddd8f5; }
.quick-mark, .site-mark { display: grid; flex: 0 0 auto; place-items: center; font-weight: 700; }
.quick-mark { width: 37px; height: 37px; border-radius: 11px; font-size: 14px; }
.quick-copy, .site-copy { display: grid; min-width: 0; gap: 4px; }
.quick-copy strong, .site-copy strong { overflow: hidden; color: #343744; font-size: 0.74rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.quick-copy small, .site-copy small { overflow: hidden; color: #a0a2ad; font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
.quick-arrow { position: absolute; top: 11px; right: 11px; color: #bbb8ce; font-size: 0.8rem; opacity: 0; transition: opacity .2s; }
.quick-card:hover .quick-arrow { opacity: 1; }
.mint { background: #e8f6f0; color: #409a75; }
.ink { background: #eeeef1; color: #33343a; }
.coral { background: #fff0ec; color: #e56c55; }
.blue { background: #eaf1ff; color: #5077cf; }
.yellow { background: #fff6db; color: #a98124; }
.purple { background: #f1eaff; color: #7759cb; }
.pink { background: #ffedf4; color: #d6598e; }
.orange { background: #fff0df; color: #dc8740; }
.red { background: #ffeded; color: #d45d67; }

.directory-section { margin-top: 37px; }
.directory-heading { align-items: end; }
.result-count { margin-left: 3px; color: #a7a9b3; font-size: 0.72rem; font-weight: 400; }
.view-options { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: #eeeff4; }
.view-option { padding: 5px 10px; border: 0; border-radius: 5px; background: transparent; color: #9194a0; cursor: pointer; font-size: 0.62rem; }
.view-option.active { background: var(--surface); color: #6258a5; box-shadow: 0 1px 4px rgb(30 30 50 / 7%); }
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.site-card { min-width: 0; padding: 12px 13px 9px; border: 1px solid #edecf2; border-radius: 10px; background: var(--surface); box-shadow: 0 3px 12px rgb(33 37 53 / 2%); transition: transform .2s, border-color .2s; }
.site-main { display: flex; min-width: 0; align-items: center; gap: 10px; }
.site-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; }
.external-arrow { margin-left: auto; color: #c0c1ca; font-size: 12px; opacity: 0; transition: opacity .2s; }
.site-main:hover .external-arrow { opacity: 1; }
.site-meta { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 0 44px; padding-top: 8px; border-top: 1px solid #f2f2f5; }
.site-category { color: #a4a5ae; font-size: 0.62rem; }
.favorite-button { width: 24px; height: 22px; padding: 0; border: 0; background: transparent; color: #b7b8c0; cursor: pointer; font-size: 1rem; line-height: 1; }
.favorite-button:hover, .favorite-button.is-favorite { color: #e5aa5e; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 44px 10px; color: #9699a5; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state > span { color: #c1badf; font-size: 2rem; }
.empty-state strong { color: #595d6a; font-size: 0.86rem; }
.empty-state p { margin: 0; font-size: 0.72rem; }
.page-footer { display: flex; justify-content: space-between; margin-top: 38px; padding: 15px 0 23px; border-top: 1px solid #e9eaf0; color: #a9abb5; font-size: 0.62rem; }
.page-footer i { margin-left: 4px; color: #c3b8eb; font-style: normal; }

.dark-theme {
  --canvas: #181923; --surface: #22232e; --surface-soft: #292a36; --text: #e9e8f0;
  --muted: #9b9cac; --line: #30313d; --purple-soft: #302d47; --shadow: 0 9px 26px rgb(0 0 0 / 12%);
}
.dark-theme .sidebar, .dark-theme .topbar { border-color: #30313d; }
.dark-theme .breadcrumbs strong, .dark-theme .quick-copy strong, .dark-theme .site-copy strong, .dark-theme .empty-state strong { color: #e4e1ed; }
.dark-theme .welcome-section { border-color: #383345; background: linear-gradient(105deg, #29263a, #302a38 65%, #392d32); }
.dark-theme .welcome-copy h1 { color: #eeebf7; }
.dark-theme .welcome-copy h1 span { color: #b9adf4; }
.dark-theme .welcome-copy p, .dark-theme .site-copy small { color: #a4a2b2; }
.dark-theme .search-box, .dark-theme .icon-button, .dark-theme .quick-card, .dark-theme .site-card, .dark-theme .hint-chip { border-color: #353642; }
.dark-theme .search-box kbd, .dark-theme .site-meta { border-color: #353642; }
.dark-theme .view-options { background: #292a36; }
.dark-theme .view-option.active { color: #c3b9fa; }
.dark-theme .sidebar-note { background: #302d47; }
.dark-theme .sidebar-note p { color: #b7b0d3; }
.dark-theme .sidebar-note p strong { color: #e0d9ff; }
.dark-theme .topbar { border-color: #30313d; }
.dark-theme .page-footer { border-color: #30313d; }

@media (max-width: 1100px) {
  .main-content { padding: 0 32px; }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-art { right: 1%; opacity: .8; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 12px 16px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 1px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 10px; }
  .brand-copy strong { font-size: 13px; }
  .side-label, .sidebar-bottom { display: none; }
  .category-nav { display: flex; overflow-x: auto; gap: 5px; margin-top: 11px; scrollbar-width: none; }
  .category-nav::-webkit-scrollbar { display: none; }
  .category-link { height: 34px; flex: 0 0 auto; gap: 6px; padding: 0 9px; font-size: 10px; }
  .category-icon { width: 15px; height: 15px; }
  .category-icon svg { width: 14px; height: 14px; }
  .category-count { display: none; }
  .main-content { margin-left: 0; padding: 0 20px; }
  .topbar { height: 55px; }
  .welcome-section { min-height: 177px; margin-top: 18px; padding: 24px 23px; }
  .welcome-copy h1 { max-width: 340px; font-size: 23px; line-height: 1.5; }
  .welcome-art { right: -79px; opacity: .4; }
  .welcome-copy { max-width: 82%; }
  .quick-section { margin-top: 28px; }
  .directory-section { margin-top: 30px; }
}
@media (max-width: 480px) {
  .main-content { padding: 0 15px; }
  .today-label { display: none; }
  .welcome-section { min-height: 169px; padding: 20px 17px; }
  .welcome-copy h1 { max-width: 270px; font-size: 20px; }
  .welcome-copy p { max-width: 245px; font-size: 11px; line-height: 1.7; }
  .welcome-art { right: -134px; }
  .search-box { height: 49px; gap: 9px; padding-left: 12px; }
  .search-box kbd { display: none; }
  .search-submit { height: 33px; padding: 0 10px; }
  .quick-grid { gap: 8px; }
  .quick-card { min-height: 69px; gap: 8px; padding: 10px 8px; }
  .quick-mark { width: 31px; height: 31px; border-radius: 9px; }
  .quick-copy strong { font-size: 10px; }
  .quick-copy small { font-size: 8px; }
  .section-heading h2 { font-size: 15px; }
  .site-grid { grid-template-columns: 1fr; gap: 8px; }
  .page-footer { gap: 10px; font-size: 8px; }
}
