.theme-collections { color: var(--pack-text, #eeeef0); min-width: 0; --theme-muted: var(--pack-muted, #a4a6af); --theme-gold: var(--pack-gold, #f3c65c); }
.theme-collections *, .theme-collections *::before, .theme-collections *::after { box-sizing: border-box; }
.theme-collections [hidden] { display: none !important; }
.theme-collections h2, .theme-collections h3, .theme-collections p { margin: 0; }
.theme-collections h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.theme-collections h3 { font-size: 17px; line-height: 1.4; }
.theme-collections :focus-visible { outline: 2px solid var(--theme-gold); outline-offset: 3px; }
.theme-note { font-size: 13px; line-height: 1.55; color: var(--theme-muted); }
.theme-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 0 0 22px; }
.theme-heading h2 + p { margin-top: 8px; }
.theme-button { appearance: none; font: inherit; font-size: 14px; line-height: 1.35; font-weight: 550; color: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 15px; border: 1px solid #ffffff26; border-radius: 10px; background: #ffffff07; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.theme-button:hover:not(:disabled) { background: #ffffff10; border-color: #ffffff40; }
.theme-button:disabled { opacity: .45; cursor: default; }
.theme-button.is-primary { color: #211a0a; background: var(--theme-gold); border-color: var(--theme-gold); }
.theme-button.is-primary:hover:not(:disabled) { background: #f7d88b; }
.theme-button.is-subtle { background: none; border-color: transparent; color: var(--theme-muted); }
.theme-button.is-danger { border-color: #dc96884d; color: #e7aaa0; }
.theme-status { margin: 0 0 16px !important; font-size: 13px; line-height: 1.5; color: var(--theme-muted); }
.theme-status.is-error { color: #edb09e; }
.theme-templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 30px; }
.theme-template { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 20px; gap: 10px; border-color: #ffffff18; border-radius: 12px; }
.theme-template strong { font-size: 17px; }
.theme-template-action { color: var(--theme-gold); font-size: 13px; margin-top: auto; padding-top: 8px; }
.theme-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 32px 24px; }
.theme-shelf-item { max-width: 280px; min-width: 0; }
.theme-cover { --cover: #1f3545; position: relative; display: flex; flex-direction: column; width: calc(100% - 12px); aspect-ratio: .74; padding: 23px 20px 23px 28px; margin: 0 6px 18px; border: 1px solid #ffffff12; border-radius: 4px 12px 12px 4px; background: linear-gradient(90deg, #0004 0 6%, #ffffff07 7%, transparent 10%), repeating-linear-gradient(0deg, #ffffff02 0 1px, #0002 1px 2px, transparent 2px 4px), var(--cover); box-shadow: inset -3px 0 4px #0004, 4px 5px 8px #0006; color: #ddc78e; transform: perspective(900px) rotateY(-5deg); transition: transform .2s ease; }
.theme-cover[data-tone="forest"] { --cover: #263c31; }
.theme-cover[data-tone="amber"] { --cover: #5d412c; }
.theme-cover:hover:not(:disabled) { transform: perspective(900px) rotateY(-1deg) translateY(-3px); background: linear-gradient(90deg, #0004 0 6%, #ffffff07 7%, transparent 10%), repeating-linear-gradient(0deg, #ffffff02 0 1px, #0002 1px 2px, transparent 2px 4px), var(--cover); }
.theme-cover::after { content: ''; position: absolute; inset: 9px 9px 9px 17px; border: 1px solid #dbc78f26; border-radius: 1px 5px 5px 1px; pointer-events: none; }
.theme-cover-label { font-size: 9px; letter-spacing: .2em; }
.theme-cover strong { font-size: clamp(17px, 2vw, 23px); line-height: 1.22; text-align: center; font-weight: 550; overflow-wrap: anywhere; text-wrap: balance; }
.theme-cover-foot { font-size: 10px; opacity: .8; margin-top: auto; padding-top: 18px; text-align: center; }
.theme-cover-symbol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 55px; height: 55px; margin: auto 0; padding: 4px; }
.theme-cover-symbol i { border: 1px solid #dbc78f60; border-radius: 1px; }
.theme-cover-symbol i.is-filled { background: #dbc78f80; }
.theme-cover-symbol:has(svg) { display: block; width: 70px; height: 70px; padding: 0; }
.theme-cover-symbol svg { width: 100%; height: 100%; }
.theme-progress-wrap { display: flex; align-items: center; gap: 14px; color: var(--theme-muted); font-size: 13px; margin-bottom: 18px; }
.theme-shelf-item .theme-progress-wrap { display: block; }
.theme-progress { appearance: none; display: block; flex: 1; max-width: 300px; min-width: 30px; height: 3px; margin: 8px 0; border: 0; border-radius: 3px; background: #ffffff16; overflow: hidden; }
.theme-progress::-webkit-progress-bar { background: #ffffff16; }
.theme-progress::-webkit-progress-value { background: #bda577; }
.theme-progress::-moz-progress-bar { background: #bda577; }
/* A theme portfolio always has one nine-pocket page. Its cover still opens,
   but page search and jump controls add no useful navigation here. */
.theme-collections .binder-page-overview, .theme-collections .binder-controls { display: none; }
.theme-achievement { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #e7c27136; border-radius: 11px; margin-bottom: 20px; }
.theme-achievement > svg { color: #d4b570; flex: 0 0 35px; width: 35px; height: 35px; }
.theme-achievement strong { font-size: 15px; }
.theme-missing { display: flex; flex-direction: column; gap: 12px; margin: 25px 0; }
.theme-missing-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 12px 0; border-bottom: 1px solid #ffffff12; }
.theme-missing-row > div { min-width: 0; }
.theme-missing-label { flex: 1 1 180px; }
.theme-missing-row strong { font-size: 14px; }
.theme-missing-row > .theme-button { flex: 0 0 auto; }
.theme-missing-variants { flex: 1 0 100%; min-width: 0; color: var(--theme-muted); font-size: 12px; line-height: 1.5; }
.theme-missing-variants > summary { cursor: pointer; width: fit-content; min-height: 44px; align-content: center; }
.theme-missing-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 18px; }
.theme-missing-list li { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.theme-missing-list li > span:first-child { color: var(--pack-text, #eeeef0); }
.theme-details { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; }
.theme-details label { flex: 1 1 200px; }
.theme-collections label { display: flex; flex-direction: column; gap: 7px; color: var(--theme-muted); font-size: 13px; min-width: 0; }
.theme-collections input, .theme-collections select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 13px; font: inherit; font-size: 16px; border: 1px solid #ffffff26; border-radius: 9px; background: #14161a; color: #ededf1; }
.theme-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 600px; margin: 22px auto; padding: 16px; border-radius: 10px; background: #202428; box-shadow: inset 0 0 0 1px #ffffff0a; }
.theme-edit-pocket { position: relative; display: block; padding: 5px; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 5 / 7; background: #111318; border: 1px solid #ffffff18; border-radius: 7px; }
.theme-edit-pocket[aria-pressed="true"] { border-color: var(--theme-gold); outline: 2px solid #f3c65c35; }
.theme-art { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; border-radius: 5px; overflow: hidden; background: #101216; }
.theme-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.theme-art-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 100%; padding: 6px; color: var(--theme-muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.theme-empty { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; color: var(--theme-muted); }
.theme-empty > span { font-size: 27px; }
.theme-empty small { font-size: 12px; }
.theme-pocket-number { position: absolute; bottom: 5px; left: 5px; background: #111318e8; border: 1px solid #ffffff18; border-radius: 4px; min-width: 20px; padding: 2px 5px; font-size: 11px; color: #babcc5; }
.theme-picker { margin: 24px 0; padding: 20px; border: 1px solid #ffffff20; border-radius: 12px; background: #ffffff03; }
.theme-picker-tools { display: flex; align-items: end; gap: 14px; margin: 16px 0; }
.theme-picker-tools > * { flex: 1; }
.theme-picker-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-height: 520px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; margin: -4px; }
.theme-card-choice { display: flex; justify-content: flex-start; gap: 12px; min-width: 0; text-align: left; padding: 10px; }
.theme-card-choice > .theme-art { width: 44px; flex: 0 0 44px; }
.theme-card-label { min-width: 0; overflow-wrap: anywhere; }
.theme-card-label strong { font-size: 13px; line-height: 1.3; }
.theme-card-label p { font-size: 12px; }
.theme-actions, .theme-remove { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.theme-remove { border-top: 1px solid #ffffff14; padding-top: 18px; }
.theme-remove > p { width: 100%; }
@media (max-width: 700px) {
  .theme-templates { grid-template-columns: 1fr; }
  .theme-template { padding: 17px; gap: 7px; }
  .theme-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 10px; }
  .theme-cover { padding: 18px 13px 18px 21px; }
  .theme-cover-symbol { width: 45px; height: 45px; gap: 5px; }
  .theme-cover-foot { font-size: 9px; padding-top: 12px; }
  .theme-cover-label { font-size: 8px; letter-spacing: .1em; }
  .theme-missing-row { gap: 12px; flex-wrap: wrap; }
  .theme-missing-row > .theme-button { font-size: 12px; padding-inline: 12px; }
  .theme-edit-grid { gap: 7px; padding: 10px; }
  .theme-empty small { font-size: 10px; }
  .theme-picker { padding: 14px; }
  .theme-picker-tools { flex-direction: column; align-items: stretch; }
  .theme-picker-results { grid-template-columns: 1fr; max-height: 420px; }
  .theme-details { gap: 10px; }
  .theme-details label { flex-basis: 140px; }
  .theme-details > .theme-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .theme-cover, .theme-button { transition: none; } }
@media (max-width: 380px) { .theme-heading { gap: 8px; } .theme-heading .theme-button { padding-inline: 9px; font-size: 12px; } }
