:root {
  /* Primitive → semantic → component tokens. */
  --blue-700: #1769aa;
  --blue-100: #e0f0ff;
  --mint-100: #d5f3e7;
  --ink-900: #202936;
  --ink-600: #5d6877;
  --paper-50: #f6f9fc;
  --paper-100: #edf3f8;
  --bg: var(--paper-50);
  --card: #fff;
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --accent: var(--blue-700);
  --accent-bg: var(--blue-100);
  --border: #d6e0e8;
  --danger: #b3261e;
  --warning-text: #725411;
  --fav-1: #ffe1e7;
  --fav-2: #d5f3e7;
  --fav-3: #dce9ff;
  --fav-4: #eee1ff;
  --fav-1-star: #d93662;
  --fav-2-star: #20855f;
  --fav-3-star: #2f6fc5;
  --fav-4-star: #8051bd;
  --radius-card: 24px;
  --radius-control: 14px;
  --radius-pill: 999px;
  --motion-standard: cubic-bezier(.2, .8, .2, 1);
  --inspector-width: 440px;
  font-family: 'Segoe UI', 'Yu Gothic UI', Meiryo, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body { margin: 0; padding-left: 232px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button-link, input:not([type=checkbox]):not([type=radio]), select, textarea {
  border: 1px solid var(--border); border-radius: var(--radius-control); padding: 11px 14px; background: var(--card); color: var(--text);
}
button, .button-link, summary { cursor: pointer; }
button, .button-link { min-height: 44px; font-weight: 600; transition: background .18s var(--motion-standard), border-radius .18s var(--motion-standard), transform .18s var(--motion-standard); }
button:hover, .button-link:hover { border-color: var(--accent); background: var(--accent-bg); text-decoration: none; }
button:disabled { opacity: .45; cursor: default; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
:focus-visible { outline: 3px solid #2d79b8; outline-offset: 3px; }
p { margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.45; }
h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -.055em; margin: 12px 0 14px; font-weight: 800; line-height: 1.4; }
h2 { font-size: 21px; margin: 0 0 16px; }
h3 { font-size: 15px; margin: 20px 0 12px; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 100; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.site-header { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 32px 18px 20px; background: #edf5fc; border-right: 0; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 12px; line-height: 1.7; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; font-size: 16px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 17px 17px 17px 6px; color: white; background: var(--accent); font-size: 25px; font-weight: 800; letter-spacing: -.08em; display: flex; align-items: baseline; justify-content: center; padding-top: 3px; }
.edition { font-size: 10px; letter-spacing: .09em; color: var(--text-muted); }
.site-header > .edition { margin: 12px 0 38px 58px; }
.primary-nav { display: grid; gap: 6px; }
.primary-nav a { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: var(--radius-pill); color: #565064; font-weight: 600; }
.primary-nav a span { font-size: 20px; width: 22px; text-align: center; line-height: 1; }
.primary-nav a:hover { background: #dfeefa; text-decoration: none; }
.primary-nav a[aria-current] { color: #0d4f84; background: #cfe7fb; }
.sidebar-note { margin-top: auto; padding: 32px 8px 12px; font-size: 11px; color: var(--text-muted); }
.sidebar-note strong { color: var(--text); font-size: 12px; }
.sidebar-note p { margin-top: 7px; }
.official-links { display: grid; gap: 8px; padding: 15px 8px 0; border-top: 1px solid var(--border); font-size: 11px; }
.workspace-bar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 36px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.bar-divider { padding: 0 12px; color: #a1b2be; }
.nonofficial { margin: 0; padding: 8px 36px; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg); }
.status-line { margin: 0; padding: 10px 36px 0; min-height: 30px; font-size: 11px; color: var(--text-muted); overflow-wrap: anywhere; }
main { padding: 20px 36px 32px; margin: auto; max-width: 1600px; }
main > section:not(#list):not(#detail) { background: white; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); max-width: 960px; }
.filter-form { display: grid; grid-template-columns: minmax(190px, 2fr) repeat(4, minmax(105px, 1fr)); gap: 14px; overflow: visible; background: white; padding: 22px; border: 1px solid #dce6ee; border-radius: var(--radius-card); }
.filter-form label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.filter-form input, .filter-form select { width: 100%; min-width: 0; font-size: 14px; background: var(--bg); }
.custom-select-field { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--text-muted); font-size: 12px; }
.custom-select-native { display: none; }
.custom-select-button { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; overflow: hidden; background: var(--bg); font-size: 13px; text-align: left; }
.custom-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron { color: var(--accent); font-size: 18px; line-height: 1; transition: transform .18s var(--motion-standard); }
.custom-select-button[aria-expanded="true"] .custom-select-chevron { transform: rotate(180deg); }
.custom-select-popover { position: absolute; z-index: 28; top: calc(100% + 6px); left: 0; width: max(100%, 230px); max-height: 360px; overflow: auto; padding: 8px; border: 1px solid #b9d2e6; border-radius: 16px; background: white; box-shadow: 0 16px 38px #164d781f; }
.custom-select-options { display: grid; gap: 4px; }
.custom-select-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); min-height: 38px; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 12px; text-align: left; }
.custom-select-option:hover { background: #edf6fd; }
.custom-select-option[aria-selected="true"] { color: #0d4f84; background: var(--accent-bg); }
.custom-select-check { color: var(--accent); font-weight: 800; text-align: center; }
.advanced-filters { grid-column: 1 / -2; }
.advanced-filters summary { width: fit-content; padding: 7px 0; color: var(--accent); font-size: 12px; font-weight: 600; }
#filter-count:not(:empty) { background: var(--accent-bg); padding: 2px 7px; border-radius: 10px; }
.advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 14px; }
.checkbox-group { min-width: 0; margin: 0; border: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.checkbox-group legend { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.checkbox-group label { flex-direction: row; align-items: center; color: var(--text); gap: 5px; }
.checkbox-group input { width: 16px; }
.talent-filter-field { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--text-muted); font-size: 12px; }
.talent-filter-button { display: flex; width: 100%; min-width: 0; align-items: center; gap: 7px; justify-content: flex-start; overflow: hidden; background: var(--bg); font-size: 13px; }
.talent-filter-button > span:not(.talent-option-avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talent-filter-button small { margin-left: auto; white-space: nowrap; }
.talent-picker { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: min(760px, 88vw); max-height: min(620px, 72vh); overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: 0 14px 34px #164d7824; }
.talent-picker-header { position: sticky; z-index: 1; top: -14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; background: white; }
.talent-picker-header button { min-height: 32px; padding: 5px 9px; font-size: 10px; }
.talent-options { display: grid; gap: 16px; }
.talent-option-group { min-width: 0; }
.talent-option-group h3 { margin: 0 0 7px; padding-bottom: 5px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }
.talent-option-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.talent-option { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 4px; min-height: 96px; padding: 7px 5px; text-align: center; background: white; }
.talent-option.selected { border-color: var(--talent-color, var(--accent)); background: color-mix(in srgb, var(--talent-color, var(--accent)) 12%, white); box-shadow: 0 0 0 1px var(--talent-color, var(--accent)); }
.talent-option-avatar { position: relative; display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 48px; overflow: hidden; border: 2px solid var(--talent-color, #a9cce7); border-radius: 50%; color: #164e78; background: #e4f1fb; font-size: 12px; font-weight: 700; }
.talent-option-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: white; }
.talent-option-avatar-compact { width: 24px; height: 24px; flex-basis: 24px; font-size: 10px; }
.talent-option-name { width: 100%; overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.talent-option small { color: var(--text-muted); font-size: 9px; }
.favorite-filter-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--text-muted); font-size: 12px; }
.favorite-filter-buttons { display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 5px; }
.favorite-filter-buttons button { min-height: 34px; padding: 6px 9px; border-radius: var(--radius-pill); font-size: 10px; }
.favorite-filter-buttons .swatch { width: 30px; height: 30px; min-height: 30px; flex: 0 0 30px; padding: 0; border: 2px solid transparent; }
.favorite-filter-buttons .swatch { font-size: 17px; line-height: 1; }
.favorite-filter-buttons button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px white inset, 0 0 0 1px var(--accent); }
.filter-reset { align-self: start; justify-self: end; font-size: 11px; }
.result-meta { font-size: 12px; color: var(--text-muted); margin: 0; }
.circle-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.circle-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid #dce5ed; border-radius: var(--radius-card); background: white; padding: 22px 22px 0; transition: border-color .2s, box-shadow .2s, transform .2s var(--motion-standard); }
.circle-card:hover { border-color: #8eb9dc; box-shadow: 0 5px 16px #164d7812; transform: translateY(-2px); }
.circle-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.space-badge { border-radius: 10px; background: var(--accent-bg); color: #0d4f84; padding: 5px 10px; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.fav-chip, .visited-chip { font-size: 11px; border-radius: var(--radius-pill); padding: 4px 8px; }
.fav-1 { color: var(--fav-1-star); background: var(--fav-1); }
.fav-2 { color: var(--fav-2-star); background: var(--fav-2); }
.fav-3 { color: var(--fav-3-star); background: var(--fav-3); }
.fav-4 { color: var(--fav-4-star); background: var(--fav-4); }
.visited-chip { color: #36684d; background: #edf6ef; }
.circle-card h3 { font-size: 20px; margin: 0 0 4px; overflow-wrap: anywhere; }
.circle-card h3 a { color: var(--text); }
.circle-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-card); }
.card-actions, .card-embed, .card-purchases { position: relative; z-index: 1; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.card-favorites { display: flex; align-items: center; gap: 4px; }
.card-favorites .swatch { width: 30px; height: 30px; min-height: 30px; flex: 0 0 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; font-size: 17px; line-height: 1; }
.card-favorites .swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px white inset; }
.offline-toggle { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 6px 10px; border-color: #87a999; color: #35604d; background: white; font-size: 11px; }
.offline-toggle-icon { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: white; background: #749787; font-size: 12px; line-height: 1; }
.offline-toggle[aria-pressed="true"] { border-color: #287657; color: white; background: #287657; box-shadow: 0 2px 8px #28765735; }
.offline-toggle[aria-pressed="true"]:hover { color: white; background: #205e46; }
.offline-toggle[aria-pressed="true"] .offline-toggle-icon { color: #287657; background: white; }
.circle-x-account { position: relative; z-index: 1; text-decoration: underline; text-underline-offset: 3px; }
.card-embed, .card-purchases { border-top: 1px solid var(--border); padding: 12px 0; min-width: 0; overflow-wrap: anywhere; }
.card-embed .embed-target { min-height: 45px; font-size: 12px; color: var(--text-muted); }
.card-embed iframe { max-width: 100%; }
.card-purchases p { margin: 5px 0; font-size: 12px; }
.card-purchase-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.card-purchase-total { color: var(--accent); font-size: 16px; font-variant-numeric: tabular-nums; }
.card-purchase-list { list-style: none; display: grid; gap: 7px; margin: 0; padding: 0; }
.card-purchase-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper-50); }
.purchase-item-name { font-weight: 600; overflow-wrap: anywhere; }
.purchase-item-detail { color: var(--text-muted); font-size: 10px; }
.purchase-item-subtotal { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.offline-order-actions { position: relative; z-index: 1; display: flex; gap: 5px; margin-left: auto; }
.offline-order-actions button { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; line-height: 1; }
.offline-card .post-badge { margin-left: 0; }
#offline-list { margin: 16px 0 24px; }
.circle-card:focus-within { outline: 2px solid #16a2bf; outline-offset: 3px; }
.name-kana { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.activity-name { font-size: 14px; margin-top: 14px; overflow-wrap: anywhere; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0 20px; }
.genre-tag, .talent-tag { font-size: 11px; padding: 4px 9px; border-radius: 8px; background: var(--paper-100); overflow-wrap: anywhere; }
.talent-tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--talent-color, #3b8064) 45%, white); color: color-mix(in srgb, var(--talent-color, #3b8064) 72%, #111); background: color-mix(in srgb, var(--talent-color, #3b8064) 13%, white); font-weight: 600; }
.talent-tag::before { content: ''; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--talent-color, #3b8064); }
.meta { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: auto; border-top: 1px solid #eee9f2; padding: 14px 0; }
.post-link { position: relative; z-index: 1; font-size: 11px; }
#detail { position: fixed; z-index: 30; inset: 0 0 0 auto; width: var(--inspector-width); overflow-y: auto; background: white; border-left: 1px solid var(--border); box-shadow: -8px 0 24px #164d7812; padding: 0 22px 24px; overflow-wrap: anywhere; }
.detail-open { padding-right: var(--inspector-width); }
.detail-open .circle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-open .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; background: white; border-bottom: 1px solid var(--border); z-index: 2; }
.detail-header h2 { font-size: 14px; margin: 0; }
.detail-header a { font-size: 11px; }
.detail-grid { display: grid; gap: 0; }
.detail-grid section, .detail-grid details { border-bottom: 1px solid var(--border); padding: 6px 0 22px; min-width: 0; }
.detail-grid p { font-size: 13px; }
.detail-grid p strong { font-weight: 600; }
.detail-grid .detail-space { color: var(--accent); font-weight: 700; margin: 18px 0 4px; }
.detail-grid .detail-name { font-size: 22px; margin: 0 0 18px; }
.fav-row { display: flex; gap: 10px; margin-bottom: 8px; }
.fav-row .swatch { width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 2px solid transparent; font-size: 24px; line-height: 1; }
.fav-row .swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px white inset; }
.detail-tabs { min-width: 0; }
.detail-tab-list { position: sticky; top: 62px; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 12px 0; background: white; border-bottom: 1px solid var(--border); }
.detail-tab { min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--paper-100); color: var(--text-muted); font-size: 12px; }
.detail-tab[aria-selected="true"] { color: white; background: var(--accent); }
.detail-tab-panel[hidden] { display: none; }
.detail-tab-panel > .post-section, .personal-tab-content > section, .personal-tab-content > details { margin: 0; }
.purchase-help { margin-bottom: 14px; }
.purchase-summary { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; color: var(--accent); background: var(--accent-bg); font-size: 17px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.purchase-list { display: grid; gap: 12px; }
.purchase-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper-50); }
.purchase-row-title { grid-column: 1 / -1; font-size: 13px; }
.purchase-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: var(--text-muted); font-size: 11px; }
.purchase-field:first-of-type { grid-column: 1 / -1; }
.purchase-row input { min-width: 0; width: 100%; padding: 9px !important; background: white; }
.purchase-subtotal { align-self: center; color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; }
.purchase-delete { justify-self: end; min-height: 34px; padding: 6px 10px; color: var(--danger); font-size: 11px; }
textarea { width: 100%; min-height: 100px; resize: vertical; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.image-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; font-size: 15px; font-weight: 700; list-style: none; }
.image-section > summary::-webkit-details-marker { display: none; }
.image-section > summary::before { content: '›'; color: var(--accent); font-size: 24px; line-height: 1; transition: transform .18s; }
.image-section[open] > summary::before { transform: rotate(90deg); }
.image-summary-hint { margin-left: auto; color: var(--text-muted); font-size: 10px; font-weight: 400; }
.image-section[open] .image-summary-hint { font-size: 0; }
.image-section[open] .image-summary-hint::after { content: 'クリックで閉じる'; font-size: 10px; }
.image-section-content { padding-top: 8px; }
.image-cell { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.image-cell img { display: block; width: 100%; height: 120px; object-fit: cover; }
.image-cell .del { position: absolute; top: 4px; right: 4px; background: #243544db; color: white; }
.image-cell .size { font-size: 10px; padding: 4px 8px; }
.post-block { border: 1px solid var(--border); padding: 12px; border-radius: 8px; margin: 12px 0; }
.visit-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.visit-list li { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.visit-list .name { flex: 1; overflow-wrap: anywhere; }
.visit-list .order { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--text-muted); }
.status { font-size: 12px; color: var(--text-muted); }
.status.error, .status-line.error { color: var(--danger); }
.status.ok, .status-line.ok { color: #27694d; }
.status.warn, .status-line.warn { color: var(--warning-text); }
.offline-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 24px; font-size: 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.offline-meta dt { color: var(--text-muted); }
.offline-meta dd { margin: 0; overflow-wrap: anywhere; }
#offline-save, #export-btn { color: white; background: var(--accent); border-color: var(--accent); }
.empty-state { padding: 32px; background: var(--paper-100); border: 1px dashed #bdb3cc; border-radius: 10px; color: var(--text-muted); font-size: 13px; grid-column: 1 / -1; }
.site-footer { padding: 0 32px 24px; font-size: 10px; color: var(--text-muted); }
@media (max-width: 1200px) {
  body { padding-left: 188px; }
  .site-header { width: 188px; padding-inline: 12px; }
  main { padding-inline: 22px; }
  .circle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-open .circle-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  body, .detail-open { padding: 0; }
  .site-header { position: static; width: auto; padding: 16px 20px 0; border-right: 0; border-bottom: 1px solid var(--border); display: block; }
  .brand { display: inline-flex; }
  .site-header > .edition { float: right; margin: 12px 0; }
  .primary-nav { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; }
  .primary-nav a { flex-shrink: 0; padding: 9px 12px; font-size: 12px; }
  .primary-nav a span { font-size: 17px; width: 16px; }
  .sidebar-note, .official-links, .workspace-bar { display: none; }
  .nonofficial { padding: 10px 20px; }
  .status-line { padding: 10px 20px 0; }
  main { padding: 20px; }
  .detail-open #list { display: none; }
  #detail { position: static; width: auto; border: 1px solid var(--border); border-radius: 12px; box-shadow: none; padding-inline: 20px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-header { position: static; }
  .detail-tab-list { top: 0; }
  .site-footer { padding-inline: 20px; }
}
@media (max-width: 580px) {
  h1 { font-size: 29px; }
  main { padding: 20px 14px; }
  .site-header { padding-inline: 14px; }
  .nonofficial, .status-line { padding-inline: 14px; }
  .primary-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; overflow: visible; }
  .primary-nav a { flex-direction: column; gap: 7px; font-size: 10px; padding: 10px 2px; white-space: nowrap; border-radius: 18px; }
  .circle-list, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; }
  .filter-form > label:first-child { grid-column: 1 / -1; }
  .advanced-filters { grid-column: 1 / -1; }
  .advanced-grid { grid-template-columns: minmax(0, 1fr); }
  .talent-picker { position: fixed; top: 112px; left: 14px; right: 14px; width: auto; max-height: calc(100vh - 126px); }
  .custom-select-popover { position: fixed; top: 112px; left: 14px; right: 14px; width: auto; max-height: calc(100vh - 126px); }
  .talent-option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-reset { grid-column: 1 / -1; }
  .circle-card { padding: 20px 20px 0; }
  main > section:not(#list):not(#detail) { padding: 20px 16px; }
  .visit-list li { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .visit-list .name { flex-basis: 70%; }
  .offline-meta { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .offline-meta dd { margin-bottom: 12px; }
  .purchase-row { grid-template-columns: minmax(0, 1fr); }
  .purchase-row-title, .purchase-field:first-of-type { grid-column: auto; }
  .purchase-delete { justify-self: stretch; }
}

.brand-mark > span { font-size: 22px; }
.brand-dot { color: var(--accent); }
.nav-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-link { font-size: 12px; }
.primary-button, .button-link.primary-button { background: var(--accent); color: white; border: 0; border-radius: var(--radius-pill); padding: 12px 20px; }
.primary-button:hover, .button-link.primary-button:hover { background: #0d548c; color: white; border-radius: 16px; }
button:active, .button-link:active { transform: scale(.98); }
.local-notice { font-size: 11px; color: var(--text-muted); padding: 0 4px; margin-bottom: 14px; }
.filter-heading { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.filter-heading h1 { font-size: 16px; margin: 0 0 2px; letter-spacing: 0; }
.filter-heading span { font-size: 11px; color: var(--text-muted); }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; }
.quick-filters { display: flex; gap: 4px; background: #dfebf5; padding: 4px; border-radius: var(--radius-pill); }
.quick-filters button { min-height: 36px; border: none; background: transparent; border-radius: var(--radius-pill); font-size: 12px; padding: 7px 16px; color: #536473; }
.quick-filters button[aria-pressed=true] { background: white; color: #0d4f84; box-shadow: 0 1px 4px #164d7817; }
.post-badge { color: #2b624b; background: #e2f4eb; border-radius: var(--radius-pill); font-size: 11px; padding: 4px 8px; margin-left: auto; }
.related-badge { color: #315a76; background: #e5f0f8; }
.card-arrow { color: var(--accent); font-size: 20px; margin-left: auto; }
.circle-card.selected { background: #fbfdff; }
.embed-preview { background: #eef6fc; border: 1px solid #dcebf6; border-radius: 20px; padding: 26px 16px; display: flex; align-items: center; flex-direction: column; gap: 12px; text-align: center; }
.embed-preview strong { font-size: 15px; }
.embed-preview p { margin: 0; }
.x-mark { width: 48px; height: 48px; display: grid; place-items: center; background: white; border-radius: 16px; font-size: 27px; }
.embed-note { margin-top: 12px; }
.embed-status:not(:empty) { padding: 10px 0; }
.embed-target { min-width: 0; }
.embed-target iframe { max-width: 100%; }
.post-date { color: var(--text-muted); font-size: 12px; }
.post-source { display: inline-block; margin-top: 12px; font-size: 13px; }
.post-timeline { position: relative; display: grid; gap: 0; padding-left: 18px; }
.post-timeline::before { content: ''; position: absolute; top: 9px; bottom: 9px; left: 5px; width: 2px; background: #ccddeb; }
.timeline-item { position: relative; padding: 0 0 22px 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 26px; }
.timeline-dot { position: absolute; top: 7px; left: -18px; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #a9cce7; }
.timeline-related .timeline-dot { background: #3b8064; box-shadow: 0 0 0 2px #b9dbc8; }
.timeline-category { padding: 3px 8px; border-radius: var(--radius-pill); background: var(--accent-bg); font-size: 11px; }
.timeline-related .timeline-category { color: #285944; background: #e1f1e8; }
.timeline-head time { margin-left: auto; }
.timeline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.timeline-actions .post-source { margin: 0; font-size: 11px; }
.timeline-embed { margin-top: 8px; }
@media (min-width: 900px) and (max-width: 1400px) {
  .detail-open .filter-heading span { display: none; }
}
@media (max-width: 899px) {
  .nav-icon { width: 19px; height: 19px; }
  .site-header { background: var(--paper-100); }
  .detail-open #detail { max-width: 640px; margin-inline: auto; }
}
@media (max-width: 580px) {
  .filter-heading span { display: none; }
  .primary-nav a { font-size: 10px; }
  .results-toolbar { align-items: start; flex-direction: column-reverse; }
  .results-toolbar .result-meta { font-size: 11px; }
  .brand-mark { width: 43px; height: 43px; }
  .detail-grid .detail-name { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .circle-card:hover, button:active, .button-link:active { transform: none; } }
