
:root {
  --accent:#ff3f6f;
  --accent-dark:#d82756;
  --accent-soft:#fff0f4;
  --cyan:#18c7d1;
  --cyan-dark:#079ca8;
  --cyan-soft:#eafcfd;
  --text:#1d2025;
  --muted:#747982;
  --line:#e4e6ea;
  --bg:#f5f6f8;
  --card:#ffffff;
  --dark:#17191d;
  --warn:#f2a12d;
  --danger:#d93257;
  --radius:18px;
}

* { box-sizing:border-box; }
html, body { min-height:100%; margin:0; background:#ececf0; }
body {
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
}
button, input { font:inherit; }
button { cursor:pointer; -webkit-tap-highlight-color:transparent; }
button:disabled { cursor:not-allowed; opacity:.42; }

.app-shell {
  width:min(100%,430px);
  min-height:100vh;
  margin:0 auto;
  padding-bottom:86px;
  background:var(--bg);
  box-shadow:0 0 40px rgba(0,0,0,.10);
}

.app-header {
  position:sticky;
  top:0;
  z-index:30;
  min-height:64px;
  display:grid;
  grid-template-columns:46px 1fr 46px;
  align-items:center;
  padding:8px 12px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(14px);
}

.app-header h1 {
  margin:0;
  text-align:center;
  font-size:17px;
  font-weight:850;
}

.header-button {
  border:0;
  border-radius:12px;
  padding:5px;
  background:transparent;
  font-size:26px;
}

main { padding:14px; }
.screen { display:none; }
.screen.active { display:block; }

.hidden { display:none !important; }

.notice-banner {
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  border:1px solid #ffadc1;
  border-radius:15px;
  color:#a51f40;
  background:var(--accent-soft);
  font-weight:850;
}

.summary-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:12px;
}

.summary-card {
  padding:12px 8px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  text-align:center;
}

.summary-card strong {
  display:block;
  margin-top:4px;
  font-size:21px;
}

.summary-card span {
  color:var(--muted);
  font-size:11px;
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:18px 2px 9px;
  font-size:14px;
  font-weight:850;
}

.count-badge {
  padding:4px 8px;
  border-radius:999px;
  color:#565961;
  background:#ececf0;
  font-size:12px;
}

.count-badge.warn {
  color:#9f6200;
  background:#fff0d0;
}

.count-badge.danger {
  color:#c32c4f;
  background:#ffe4eb;
}

.list-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
}

.empty-state {
  padding:24px 16px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
}

.item-entry {
  width:100%;
  display:grid;
  grid-template-columns:44px 1fr auto;
  gap:10px;
  align-items:center;
  padding:12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  text-align:left;
}

.item-entry:last-child { border-bottom:0; }

.avatar {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eeeef2;
  font-size:22px;
}

.item-entry strong {
  display:block;
  margin-bottom:3px;
  font-size:15px;
}

.item-entry .meta {
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.item-entry .expiry {
  text-align:right;
  font-size:11px;
}

.item-entry .expiry b {
  display:block;
  margin-bottom:4px;
  color:var(--danger);
  font-size:12px;
}

.item-entry .expiry b.soon { color:#b16d00; }
.item-entry .expiry b.normal { color:#4a4d53; }

.primary-button,
.secondary-button,
.outline-danger-button,
.small-button {
  width:100%;
  border-radius:15px;
  padding:14px 15px;
  font-weight:850;
}

.primary-button {
  border:0;
  color:white;
  background:var(--accent);
  box-shadow:0 8px 20px rgba(255,95,134,.20);
}

.primary-button.dark {
  background:var(--dark);
  box-shadow:none;
}

.secondary-button {
  border:1px solid var(--line);
  color:var(--text);
  background:#fff;
}

.outline-danger-button {
  border:1px solid #ff9db4;
  color:#c92e51;
  background:#fff;
}

.small-button {
  width:auto;
  padding:8px 12px;
  border:1px solid var(--line);
  background:#fff;
}

.steps {
  display:flex;
  justify-content:center;
  gap:22px;
  margin:4px 0 18px;
  color:#9a9da4;
  font-size:12px;
}

.steps .active {
  color:var(--text);
  font-weight:850;
}

.search-input,
.field-input {
  width:100%;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:13px;
  outline:none;
  background:#fff;
}

.search-input:focus,
.field-input:focus {
  border-color:#ff9db4;
  box-shadow:0 0 0 3px rgba(255,95,134,.10);
}

.listener-select-row,
.listener-manage-row {
  width:100%;
  display:grid;
  align-items:center;
  gap:9px;
  padding:12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.listener-select-row {
  grid-template-columns:34px 1fr auto;
}

.listener-manage-row {
  grid-template-columns:44px 1fr auto;
}

.listener-select-row:last-child,
.listener-manage-row:last-child {
  border-bottom:0;
}

.listener-select-row.selected {
  background:#fff8fa;
}

.select-circle {
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border:1.5px solid #b8bbc2;
  border-radius:50%;
  background:#fff;
}

.listener-select-row.selected .select-circle {
  color:#fff;
  border-color:var(--dark);
  background:var(--dark);
}

.listener-name {
  font-weight:850;
}

.listener-sub {
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.favorite-star { color:#f5b800; }

.helper-text {
  margin:10px 2px 14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.sticky-actions {
  position:sticky;
  bottom:74px;
  z-index:15;
  display:grid;
  gap:10px;
  padding-top:12px;
  background:linear-gradient(transparent,var(--bg) 24%);
}

.assignment-card {
  margin-bottom:12px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.assignment-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.assignment-header strong { font-size:15px; }

.assignment-total {
  padding:5px 9px;
  border-radius:999px;
  background:#f0f0f3;
  font-size:12px;
  font-weight:850;
}

.assignment-total.full {
  color:#c62c4e;
  background:#ffe3ea;
}

.item-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.item-tile {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fafafd;
}

.item-visual {
  min-height:86px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:7px 4px 5px;
}

.item-visual img {
  width:48px;
  height:48px;
  border-radius:10px;
  object-fit:cover;
  background:#111;
}

.item-visual span {
  white-space:nowrap;
  font-size:11px;
  font-weight:850;
}

.quantity-segment {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1px;
  border-top:1px solid var(--line);
  background:var(--line);
}

.quantity-segment button {
  border:0;
  padding:7px 0;
  background:#fff;
  font-size:12px;
  font-weight:850;
}

.quantity-segment button.active {
  color:#fff;
  background:var(--accent);
}

.rare-area {
  margin-top:10px;
  overflow:hidden;
  border:1px dashed #e3a2b3;
  border-radius:14px;
  background:#fff8fa;
}

.rare-area summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  cursor:pointer;
  list-style:none;
  font-weight:850;
}

.rare-area summary::-webkit-details-marker { display:none; }
.rare-body { padding:0 10px 10px; }

.info-card {
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.info-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:9px 0;
  border-bottom:1px solid var(--line);
}

.info-row:last-child { border-bottom:0; }

.confirm-person {
  padding:11px 0;
  border-bottom:1px solid var(--line);
}

.confirm-person:last-child { border-bottom:0; }

.confirm-person strong {
  display:block;
  margin-bottom:8px;
}

.item-chips {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.item-chip {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 8px;
  border-radius:999px;
  background:#f1f1f4;
  font-size:12px;
  font-weight:800;
}

.item-chip img {
  width:22px;
  height:22px;
  border-radius:6px;
  object-fit:cover;
  background:#111;
}

.success-icon {
  width:82px;
  height:82px;
  display:grid;
  place-items:center;
  margin:36px auto 18px;
  border:3px solid var(--dark);
  border-radius:50%;
  font-size:42px;
}

.center-text { text-align:center; }

.pending-card,
.settings-card,
.history-card,
.detail-card {
  margin-bottom:10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.pending-card {
  border-color:#ffb1c4;
}

.pending-card strong,
.history-card strong {
  display:block;
  margin-bottom:4px;
}

.button-stack {
  display:grid;
  gap:10px;
}

.quick-time-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin-top:8px;
}

.quick-time-grid button {
  padding:9px 4px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  font-size:12px;
}

.field-label {
  display:block;
  margin:15px 0 7px;
  font-size:13px;
  font-weight:850;
}

.checkbox-row {
  display:flex;
  align-items:center;
  gap:8px;
  margin:15px 0;
  font-size:14px;
}

.history-stack {
  display:grid;
  gap:10px;
}

.history-card {
  width:100%;
  border:1px solid var(--line);
  text-align:left;
}

.history-card .history-meta {
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.history-card .history-status {
  display:inline-block;
  margin-top:8px;
  padding:4px 8px;
  border-radius:999px;
  background:#f0f0f3;
  font-size:11px;
  font-weight:800;
}

.detail-participant {
  padding:12px 0;
  border-bottom:1px solid var(--line);
}

.detail-participant:last-child { border-bottom:0; }

.detail-item-row {
  display:grid;
  grid-template-columns:40px 1fr auto;
  gap:9px;
  align-items:center;
  margin-top:9px;
}

.detail-item-row img {
  width:38px;
  height:38px;
  border-radius:9px;
  object-fit:cover;
  background:#111;
}

.detail-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  max-width:150px;
}

.detail-actions button {
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  font-size:11px;
  font-weight:800;
}

.detail-actions .use-button {
  color:#fff;
  border-color:var(--dark);
  background:var(--dark);
}

.settings-card h3 {
  margin:0 0 8px;
  font-size:15px;
}

.settings-card p {
  margin:0 0 12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.file-label {
  display:block;
  text-align:center;
}

.bottom-space { height:16px; }
.spacing-top { margin-top:14px; }
.spacing-top-small { margin-top:10px; }

.bottom-nav {
  position:fixed;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  z-index:40;
  width:min(100%,430px);
  height:72px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(14px);
  padding-bottom:env(safe-area-inset-bottom);
}

.bottom-nav button {
  border:0;
  color:#777b82;
  background:transparent;
  font-size:11px;
  font-weight:750;
}

.bottom-nav button span {
  display:block;
  margin-bottom:4px;
  font-size:21px;
}

.bottom-nav button.active { color:var(--accent); }

.modal {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:end center;
  padding:20px;
  background:rgba(0,0,0,.42);
}

.modal-card {
  width:min(100%,430px);
  max-height:92vh;
  overflow:auto;
  padding:18px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
}

.modal-card h2 {
  margin:0 0 12px;
  font-size:18px;
}

.toast {
  position:fixed;
  left:50%;
  bottom:84px;
  z-index:120;
  width:min(calc(100% - 28px),402px);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  border-radius:14px;
  color:#fff;
  background:#242628;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,20px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
  font-size:13px;
}

.toast.show {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translate(-50%,0);
}

.toast button {
  border:0;
  color:#ff91ab;
  background:transparent;
  font-weight:850;
}

@media (min-width:700px) {
  body { padding:24px 0; }
  .app-shell { min-height:calc(100vh - 48px); border-radius:24px; overflow:hidden; }
}

.detail-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  max-width:150px;
}

.detail-actions .use-two-button {
  background:#ff5f86;
  border-color:#ff5f86;
}

.used-complete-label {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:10px;
  color:#777b82;
  background:#f0f0f3;
  font-size:11px;
  font-weight:850;
}


/* v0.3: listener-grouped holdings on the home screen */
.holding-person-card {
  background:#fff;
  border-bottom:1px solid var(--line);
}

.holding-person-card:last-child {
  border-bottom:0;
}

.holding-person-header {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:13px 12px 10px;
}

.holding-person-name {
  min-width:0;
}

.holding-person-name strong {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:16px;
}

.holding-person-name small {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}

.holding-earliest {
  text-align:right;
}

.holding-earliest small {
  display:block;
  margin-bottom:3px;
  color:var(--muted);
  font-size:10px;
}

.holding-earliest b {
  display:block;
  font-size:12px;
  white-space:nowrap;
}

.holding-earliest b.danger,
.holding-expiry-text b.danger {
  color:var(--danger);
}

.holding-earliest b.soon,
.holding-expiry-text b.soon {
  color:#b16d00;
}

.holding-earliest b.normal,
.holding-expiry-text b.normal {
  color:#4a4d53;
}

.holding-expiry-list {
  border-top:1px solid #f0f0f2;
}

.holding-expiry-row {
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px 10px 66px;
  border:0;
  border-bottom:1px solid #f0f0f2;
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.holding-expiry-row:last-child {
  border-bottom:0;
}

.holding-expiry-row:active {
  background:#fff7f9;
}

.home-item-chip-list {
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
}

.home-item-chip {
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px 7px 3px 3px;
  border:1px solid #e7e7eb;
  border-radius:10px;
  background:#f8f8fa;
}

.home-item-chip img {
  width:30px;
  height:30px;
  border-radius:8px;
  object-fit:cover;
  background:#111;
}

.home-item-chip b {
  color:#34363a;
  font-size:12px;
  white-space:nowrap;
}

.holding-expiry-text {
  text-align:right;
  white-space:nowrap;
}

.holding-expiry-text b {
  display:block;
  margin-bottom:3px;
  font-size:12px;
}

.holding-expiry-text small {
  display:block;
  color:#55585e;
  font-size:10px;
}

@media (max-width:360px) {
  .holding-person-header {
    grid-template-columns:40px minmax(0,1fr);
  }

  .holding-earliest {
    grid-column:2;
    text-align:left;
  }

  .holding-earliest small,
  .holding-earliest b {
    display:inline;
  }

  .holding-expiry-row {
    padding-left:12px;
  }
}


/* v0.4: listener-only holdings screen */
.holding-person-header {
  width:100%;
  border:0;
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.listener-holdings-profile {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.listener-holdings-profile .avatar {
  width:46px;
  height:46px;
}

.listener-holdings-profile-name {
  min-width:0;
}

.listener-holdings-profile-name strong,
.listener-holdings-profile > span:nth-child(2) strong {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:17px;
}

.listener-holdings-profile-name small,
.listener-holdings-profile > span:nth-child(2) small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.listener-holdings-profile-expiry {
  text-align:right;
}

.listener-holdings-profile-expiry small {
  display:block;
  margin-bottom:3px;
  color:var(--muted);
  font-size:10px;
}

.listener-holdings-profile-expiry strong {
  display:block;
  font-size:12px;
  white-space:nowrap;
}

.listener-expiry-stack {
  display:grid;
  gap:12px;
  margin-top:12px;
}

.listener-expiry-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.listener-expiry-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:13px 14px;
  border-bottom:1px solid var(--line);
  background:#fafafd;
}

.listener-expiry-heading small {
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:10px;
}

.listener-expiry-heading strong {
  display:block;
  font-size:13px;
}

.listener-expiry-remaining {
  text-align:right;
}

.listener-expiry-items {
  padding:0 14px;
}

.listener-holding-item-row {
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
}

.listener-holding-item-row:last-child {
  border-bottom:0;
}

.listener-holding-item-row > img {
  width:44px;
  height:44px;
  border-radius:10px;
  object-fit:cover;
  background:#111;
}

.listener-holding-item-info {
  min-width:0;
}

.listener-holding-item-info strong {
  display:block;
  font-size:14px;
}

.listener-holding-item-info small {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}

.battle-detail-link {
  width:100%;
  padding:12px 14px;
  border:0;
  border-top:1px solid var(--line);
  color:#65686f;
  background:#fff;
  text-align:right;
  font-size:12px;
  font-weight:800;
}

.battle-detail-link:active {
  background:#f7f7f9;
}

.listener-holdings-empty {
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

@media (max-width:380px) {
  .listener-holdings-profile {
    grid-template-columns:44px minmax(0,1fr);
  }

  .listener-holdings-profile-expiry {
    grid-column:2;
    text-align:left;
  }

  .listener-holdings-profile-expiry small,
  .listener-holdings-profile-expiry strong {
    display:inline;
  }

  .listener-holding-item-row {
    grid-template-columns:42px minmax(0,1fr);
  }

  .listener-holding-item-row .detail-actions {
    grid-column:1 / -1;
    max-width:none;
    justify-content:flex-end;
  }
}


/* v0.5: item guide and retention settings */
.guide-intro-card {
  padding:16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(145deg,#fff,#fff5f8);
}

.guide-intro-card h2 {
  margin:0 0 7px;
  font-size:18px;
}

.guide-intro-card p {
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.65;
}

.guide-list {
  display:grid;
  gap:10px;
  margin-top:12px;
}

.guide-list-card {
  width:100%;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.guide-list-card > img {
  width:56px;
  height:56px;
  object-fit:cover;
  border-radius:13px;
  background:#111;
}

.guide-list-copy {
  min-width:0;
}

.guide-list-copy strong {
  display:block;
  font-size:15px;
}

.guide-list-copy small {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}

.guide-list-copy > span {
  display:-webkit-box;
  margin-top:6px;
  overflow:hidden;
  color:#55585e;
  font-size:11px;
  line-height:1.45;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.guide-list-side {
  display:grid;
  justify-items:end;
  gap:8px;
}

.guide-list-side b {
  color:#8a8d93;
  font-size:22px;
}

.guide-source-badge {
  display:inline-flex;
  width:max-content;
  padding:4px 7px;
  border-radius:999px;
  font-size:9px;
  font-weight:850;
  white-space:nowrap;
}

.guide-source-badge.official {
  color:#386742;
  background:#e8f6eb;
}

.guide-source-badge.external {
  color:#9a5b00;
  background:#fff0d0;
}

.guide-hero-card {
  display:grid;
  grid-template-columns:76px minmax(0,1fr);
  align-items:center;
  gap:13px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.guide-hero-card > img {
  width:74px;
  height:74px;
  object-fit:cover;
  border-radius:16px;
  background:#111;
}

.guide-hero-card strong {
  display:block;
  font-size:20px;
}

.guide-hero-card small {
  display:block;
  margin:3px 0 8px;
  color:var(--muted);
  font-size:11px;
}

.guide-fact-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:9px;
  margin-top:10px;
}

.guide-fact-grid > div {
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.guide-fact-grid span {
  display:block;
  color:var(--muted);
  font-size:10px;
}

.guide-fact-grid strong {
  display:block;
  margin-top:5px;
  font-size:13px;
}

.guide-section,
.guide-source-card {
  margin-top:10px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

.guide-section h3 {
  margin:0 0 8px;
  font-size:14px;
}

.guide-section p,
.guide-source-card p {
  margin:0;
  color:#46494f;
  font-size:13px;
  line-height:1.75;
}

.guide-source-card > strong {
  display:block;
  margin-bottom:7px;
  font-size:13px;
}

.guide-source-card small {
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:10px;
}

.guide-warning {
  margin:10px 2px 14px;
  padding:10px 12px;
  border-radius:12px;
  color:#765400;
  background:#fff4d9;
  font-size:11px;
  line-height:1.55;
}

.guide-textarea {
  min-height:92px;
  resize:vertical;
  line-height:1.6;
}

select.field-input {
  appearance:auto;
  -webkit-appearance:menulist;
}

@media (max-width:360px) {
  .guide-list-card {
    grid-template-columns:50px minmax(0,1fr);
  }

  .guide-list-card > img {
    width:48px;
    height:48px;
  }

  .guide-list-side {
    grid-column:2;
    grid-template-columns:auto auto;
    align-items:center;
    justify-content:space-between;
  }
}


.header-spacer {
  display:block;
  width:46px;
  height:46px;
}


/* v0.6: fixed home registration button */
.home-floating-register {
  position:fixed;
  left:50%;
  bottom:82px;
  transform:translateX(-50%);
  z-index:38;
  width:min(calc(100% - 28px),402px);
  min-height:58px;
  padding:14px 18px;
  border:0;
  border-radius:18px;
  color:#fff;
  background:var(--accent);
  box-shadow:0 10px 28px rgba(255,95,134,.34);
  font-size:16px;
  font-weight:900;
}

.home-floating-register:active {
  transform:translateX(-50%) scale(.99);
}

.home-list-bottom-space {
  height:88px;
}

.home-screen-active .toast {
  bottom:154px;
}

/* v0.6: collapse acquisition groups per listener */
.holding-expand-button {
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  padding:11px 12px;
  border:0;
  border-top:1px solid #f0f0f2;
  color:#666970;
  background:#fafafd;
  font-size:12px;
  font-weight:850;
}

.holding-expand-button:active {
  background:#f3f3f6;
}

.holding-expand-button span {
  color:#9a9da4;
  font-size:15px;
}

/* v0.6: first-listener guidance */
.modal-guide-icon {
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin:0 auto 12px;
  border-radius:50%;
  background:var(--accent-soft);
  font-size:29px;
}

.modal-guide-text {
  margin:0 0 18px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
  line-height:1.65;
}

#firstListenerModal .modal-card h2 {
  text-align:center;
}

@media (max-width:360px) {
  .home-floating-register {
    min-height:54px;
    font-size:15px;
  }
}


/* v0.6.1: listener header summary */
.holding-summary {
  min-width:54px;
  text-align:right;
}

.holding-summary small {
  display:block;
  margin-bottom:2px;
  color:var(--muted);
  font-size:10px;
}

.holding-summary b {
  display:block;
  color:#3f4248;
  font-size:14px;
  white-space:nowrap;
}

.holding-summary em {
  display:block;
  margin-top:2px;
  color:#9699a0;
  font-size:9px;
  font-style:normal;
}

@media (max-width:360px) {
  .holding-summary {
    grid-column:2;
    text-align:left;
  }

  .holding-summary small,
  .holding-summary b,
  .holding-summary em {
    display:inline;
    margin-right:4px;
  }
}


/* v0.6.2: one expiry card at a time on listener holdings */
.holdings-expiry-tabs {
  display:flex;
  gap:8px;
  margin-top:12px;
  padding:2px 1px 6px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.holdings-expiry-tabs::-webkit-scrollbar {
  display:none;
}

.holdings-expiry-tab {
  flex:0 0 auto;
  min-width:112px;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:13px;
  color:#666970;
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.holdings-expiry-tab span {
  font-size:10px;
  font-weight:850;
}

.holdings-expiry-tab b {
  font-size:12px;
  white-space:nowrap;
}

.holdings-expiry-tab.active {
  color:#fff;
  border-color:var(--dark);
  background:var(--dark);
  box-shadow:0 5px 14px rgba(35,36,38,.16);
}

.oldest-use-guidance {
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #dfe9e1;
  border-radius:13px;
  color:#45604b;
  background:#f1f8f2;
}

.oldest-use-guidance > span {
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:#568a61;
  font-size:11px;
  font-weight:900;
}

.oldest-use-guidance p {
  margin:0;
  font-size:11px;
  line-height:1.55;
}

.active-expiry-card {
  margin-top:0;
}

@media (max-width:360px) {
  .holdings-expiry-tab {
    min-width:104px;
  }
}


/* v0.7: two fixed home actions */
.home-floating-actions {
  position:fixed;
  left:50%;
  bottom:82px;
  transform:translateX(-50%);
  z-index:38;
  width:min(calc(100% - 28px),402px);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.home-action-button {
  min-height:58px;
  padding:12px 9px;
  border-radius:17px;
  font-size:14px;
  font-weight:900;
  box-shadow:0 9px 24px rgba(0,0,0,.14);
}

.home-action-button.register-action {
  border:0;
  color:#fff;
  background:var(--accent);
}

.home-action-button.use-action {
  border:0;
  color:#fff;
  background:var(--dark);
}

.home-action-button:active {
  transform:scale(.99);
}

/* v0.7: choose listener for usage */
.use-listener-stack {
  display:grid;
  gap:10px;
  margin-top:12px;
}

.use-intro-card {
  background:linear-gradient(145deg,#fff,#f6f7f8);
}

.use-listener-card {
  width:100%;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) 18px;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  text-align:left;
  appearance:none;
  -webkit-appearance:none;
}

.use-listener-copy {
  min-width:0;
}

.use-listener-copy > strong {
  display:block;
  font-size:15px;
}

.use-listener-copy > small {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}

.use-listener-item-list {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:8px;
}

.use-listener-item-chip {
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px 6px 3px 3px;
  border:1px solid #e8e8eb;
  border-radius:9px;
  background:#f8f8fa;
}

.use-listener-item-chip img {
  width:25px;
  height:25px;
  border-radius:7px;
  object-fit:cover;
  background:#111;
}

.use-listener-item-chip b {
  font-size:10px;
}

.use-listener-arrow {
  color:#92959b;
  font-size:24px;
}

.use-empty-state {
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}

/* v0.7: quick use */
.quick-use-section {
  margin-top:12px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.quick-use-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.quick-use-heading strong {
  display:block;
  font-size:15px;
}

.quick-use-heading small {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}

.quick-use-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}

.quick-use-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fafafd;
}

.quick-use-item-info {
  width:100%;
  min-height:112px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 7px 8px;
  border:0;
  background:#fff;
}

.quick-use-item-info img {
  width:56px;
  height:56px;
  border-radius:12px;
  object-fit:cover;
  background:#111;
}

.quick-use-item-info span {
  text-align:center;
}

.quick-use-item-info strong {
  display:block;
  font-size:12px;
}

.quick-use-item-info small {
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}

.quick-use-item-info:active {
  background:var(--cyan-soft);
}

.quick-use-actions {
  display:flex;
  justify-content:center;
  gap:7px;
  padding:0 8px 10px;
  background:#fff;
}

.quick-use-count-button {
  min-width:72px;
  min-height:35px;
  padding:7px 10px;
  border:0;
  border-radius:999px;
  color:#fff;
  background:var(--dark);
  font-size:11px;
  font-weight:900;
  box-shadow:0 3px 8px rgba(23,25,29,.13);
}

.quick-use-count-button:active {
  transform:scale(.97);
  background:var(--cyan-dark);
}

.holdings-detail-panel {
  margin-top:12px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
}

.holdings-detail-panel > summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px;
  cursor:pointer;
  list-style:none;
  font-size:13px;
  font-weight:850;
}

.holdings-detail-panel > summary::-webkit-details-marker {
  display:none;
}

.holdings-detail-panel > summary b {
  padding:4px 8px;
  border-radius:999px;
  color:#686b72;
  background:#f0f0f3;
  font-size:10px;
}

.holdings-detail-content {
  padding:0 12px 12px;
  border-top:1px solid var(--line);
}

.detail-only-item-row .detail-actions:empty {
  display:none;
}

@media (max-width:360px) {
  .home-action-button {
    min-height:54px;
    font-size:13px;
  }

  .quick-use-grid {
    gap:7px;
  }

  .quick-use-main {
    min-height:120px;
  }
}

.home-floating-register {
  display:none !important;
}


/* v0.7.1: LiveKeep magenta / cyan identity */
.home-action-button.use-action {
  color:#10272a;
  background:var(--cyan);
  box-shadow:0 9px 24px rgba(24,199,209,.26);
}

.home-action-button.register-action {
  background:var(--accent);
  box-shadow:0 9px 24px rgba(255,63,111,.27);
}

.use-intro-card {
  border-color:#d6f2f4;
  background:linear-gradient(145deg,#ffffff,var(--cyan-soft));
}

.use-listener-card:active {
  border-color:var(--cyan);
  background:var(--cyan-soft);
}

.use-listener-arrow {
  color:var(--cyan-dark);
}

.quick-use-section {
  border-top:3px solid var(--cyan);
}

.oldest-use-guidance {
  border-color:#cdeff1;
  color:#28585c;
  background:var(--cyan-soft);
}

.oldest-use-guidance > span {
  background:var(--cyan-dark);
}
