* { box-sizing: border-box; }

:root {
  --bg: #fffaf4;
  --paper: #ffffff;
  --ink: #3f3a37;
  --sub: #77706b;
  --line: #eadfd4;
  --soft: #f6eee6;
  --shadow: 0 10px 30px rgba(88, 70, 55, 0.08);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
               "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(240,225,209,.55), transparent 24rem),
    radial-gradient(circle at 90% 0%, rgba(225,238,219,.52), transparent 22rem),
    var(--bg);
  min-height: 100vh;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 28px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sub);
}

h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  letter-spacing: -.04em;
  font-weight: 800;
}

.lead {
  margin: 14px 0 0;
  color: var(--sub);
  font-size: 15px;
}

.today-card {
  min-width: 180px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.7;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 28px 72px;
}

.notice {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.notice strong { white-space: nowrap; }
.notice span { color: var(--sub); }

.wallet-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 22px;
  align-items: center;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
}

.wallet-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wallet-copy strong {
  font-size: 14px;
}

.wallet-copy span {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.55;
}

.wallet-copy small {
  color: #958a81;
  font-size: 11px;
}

.wallet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wallet-button,
.wallet-link-button {
  font: inherit;
  cursor: pointer;
}

.wallet-button {
  border: 1px solid #d6c4b3;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(88,70,55,.06);
}

.wallet-button:hover {
  border-color: #bda48d;
}

.wallet-button:disabled {
  opacity: .5;
  cursor: wait;
}

.wallet-button.secondary {
  background: #f8f0e8;
}

.wallet-button.secondary.active {
  background: #ede0d3;
  border-color: #baa088;
}

.wallet-link-button {
  border: 0;
  background: transparent;
  color: var(--sub);
  padding: 8px 4px;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wallet-status {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--sub);
  font-size: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 12px;
}

h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.controls input,
.controls select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  min-height: 42px;
}

.sync-status {
  color: var(--sub);
  font-size: 12px;
  margin: 0 0 16px;
  min-height: 18px;
}

.sync-status.ready { color: #60755c; }
.sync-status.fallback { color: #8b7766; }

.resident-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.resident {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 16px;
  min-height: 210px;
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.resident:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(88,70,55,.12);
  border-color: #dac8b7;
}

.owned-resident {
  position: relative;
  border-color: #c7a987;
  box-shadow:
    0 10px 30px rgba(88,70,55,.08),
    0 0 0 2px rgba(202,171,137,.15);
}

.owned-resident::after {
  content: "✦";
  position: absolute;
  right: 13px;
  top: 11px;
  color: #ba956c;
  font-size: 15px;
}

.resident-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--soft);
  font-size: 29px;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.number {
  font-weight: 750;
  font-size: 16px;
}

.owner-badge {
  display: inline-flex;
  margin-top: 5px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f4e9dc;
  color: #7b6048;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.owner-badge-large {
  margin-right: 6px;
  margin-bottom: 4px;
}

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

.action {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag,
.season-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
}

.tag {
  background: var(--soft);
  color: #665d56;
}

.season-chip {
  background: #f3eee8;
  color: #6f6257;
  white-space: nowrap;
}

footer {
  border-top: 1px solid var(--line);
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  color: var(--sub);
  font-size: 13px;
}

footer p { margin: 3px 0; }
.small { font-size: 11px; }

dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(50,40,32,.22);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(61,51,44,.28);
  backdrop-filter: blur(3px);
}

.close-button {
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 2;
  border: 0;
  background: rgba(255,255,255,.88);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink);
}

.detail-hero {
  background: var(--soft);
  padding: 34px 28px 24px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-title .avatar {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
  background: rgba(255,255,255,.75);
  font-size: 38px;
  border-radius: 22px;
}

.detail-title h3 {
  margin: 0;
  font-size: 28px;
}

.detail-title p {
  margin: 4px 0 0;
  color: var(--sub);
  font-size: 13px;
}

.detail-title .season-chip {
  margin-top: 8px;
}

.detail-body {
  padding: 24px 28px 32px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.holder-panel {
  border: 1px solid #dbc4aa;
  border-radius: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(236,216,193,.5), transparent 14rem),
    #fffbf7;
}

.holder-panel h4 {
  color: #765b43;
  font-size: 15px;
}

.holder-message {
  margin: 8px 0 14px;
  line-height: 1.7;
}

.holder-sign {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(244,233,220,.72);
}

.holder-sign span {
  color: var(--sub);
  font-size: 10px;
}

.holder-sign strong {
  font-size: 13px;
}

.holder-note {
  margin: 9px 0 0;
  color: var(--sub);
  font-size: 10px;
}

.diary {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.65;
}

.diary:last-child {
  border-bottom: 0;
}

.diary-date {
  color: var(--sub);
  font-size: 11px;
  margin-bottom: 3px;
}

.treasure-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.treasure-history {
  border-top: 1px dashed var(--line);
}

.treasure-history-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.treasure-history-date {
  color: var(--sub);
  font-size: 11px;
  padding-top: 2px;
}

.treasure-history-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.55;
}

.treasure-history-main span {
  color: var(--sub);
  font-size: 12px;
}

.meter-row {
  display: grid;
  grid-template-columns: 78px 1fr 36px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 12px;
}

.meter {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe6dd;
}

.meter span {
  display: block;
  height: 100%;
  background: #bba58f;
  border-radius: inherit;
}

.opensea-link {
  display: block;
  width: fit-content;
  margin-top: 10px;
  color: #665d56;
  font-size: 12px;
  text-underline-offset: 3px;
}

.muted {
  color: var(--sub);
  font-size: 13px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--sub);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

@media (max-width: 920px) {
  .resident-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 38px;
    display: block;
  }

  .today-card {
    margin-top: 22px;
    width: fit-content;
  }

  .wallet-panel {
    grid-template-columns: 1fr;
  }

  .wallet-actions {
    justify-content: flex-start;
  }

  .wallet-status {
    grid-column: 1;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .resident-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .detail-hero {
    padding: 28px 20px 20px;
  }

  .detail-body {
    padding: 20px 20px 28px;
  }

  .detail-title .avatar {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .detail-title h3 {
    font-size: 23px;
  }
}

@media (max-width: 460px) {
  .hero,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .resident-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .avatar {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .treasure-history-row {
    grid-template-columns: 62px 1fr;
    gap: 8px;
  }
}


/* === v0.6 friend relationships === */
.friend-intro {
  margin: -2px 0 12px;
  color: var(--sub);
  font-size: 12px;
}

.friend-list {
  display: grid;
  gap: 9px;
}

.friend-card {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fffdfa;
  border-radius: 14px;
  padding: 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.friend-card:hover {
  transform: translateY(-1px);
  border-color: #d9c4b0;
  box-shadow: 0 6px 18px rgba(88,70,55,.07);
}

.friend-avatar.avatar {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-radius: 13px;
}

.friend-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.friend-copy strong {
  font-size: 13px;
}

.friend-copy small {
  color: #8a7461;
  font-size: 10px;
}

.friend-copy > span {
  color: var(--sub);
  font-size: 11px;
  line-height: 1.45;
}

.friend-today {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f7f0e9;
  color: #6e5d50;
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 460px) {
  .friend-card {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }

  .friend-avatar.avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}


/* === v0.7 Nemo collection book === */

.collection-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  margin: -14px 0 38px;
  padding: 19px;
  border: 1px solid #ddcfbf;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(230,219,205,.52), transparent 20rem),
    rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.collection-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.collection-kicker {
  color: #9a8775;
  font-size: 9px;
  letter-spacing: .16em;
  font-weight: 700;
}

.collection-copy strong {
  font-size: 15px;
}

.collection-copy > span:not(.collection-kicker) {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.6;
}

.collection-copy small {
  color: #8e8074;
  font-size: 11px;
  line-height: 1.5;
}

.collection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.collection-count {
  min-width: 78px;
  text-align: right;
  color: #765f4d;
  font-size: 13px;
  font-weight: 750;
}

.collection-button {
  border: 1px solid #cdb49c;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fffaf5;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(88,70,55,.07);
}

.collection-button:hover {
  border-color: #b7987b;
}

.collection-button:disabled {
  opacity: .45;
  cursor: wait;
}

.collection-dialog {
  width: min(880px, calc(100vw - 28px));
}

.collection-hero {
  padding: 34px 30px 26px;
  background:
    radial-gradient(circle at 90% 0%, rgba(226,237,217,.62), transparent 20rem),
    var(--soft);
}

.collection-hero h3 {
  margin: 5px 0 6px;
  font-size: 30px;
}

.collection-hero p:not(.collection-kicker) {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
}

.collection-total {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(189,166,143,.55);
  border-radius: 13px;
  background: rgba(255,255,255,.7);
}

.collection-total strong {
  font-size: 20px;
}

.collection-total span {
  color: var(--sub);
  font-size: 10px;
}

.collection-body {
  padding: 26px 30px 36px;
}

.collection-section {
  margin-bottom: 30px;
}

.collection-section:last-child {
  margin-bottom: 0;
}

.collection-section h4 {
  margin: 0 0 5px;
  font-size: 15px;
}

.collection-section > p,
.collection-grid-head p {
  margin: 0 0 13px;
  color: var(--sub);
  font-size: 11px;
  line-height: 1.55;
}

.milestone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.milestone {
  min-height: 76px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdfa;
  position: relative;
}

.milestone.unlocked {
  border-color: #ceb495;
  background: #fff9f1;
}

.milestone.locked {
  opacity: .58;
}

.milestone-icon {
  font-size: 22px;
}

.milestone div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.milestone strong {
  font-size: 11px;
  line-height: 1.35;
}

.milestone small {
  color: var(--sub);
  font-size: 9px;
}

.milestone-state {
  grid-column: 1 / -1;
  color: #8a7059;
  font-size: 9px;
}

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

.place-set {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.place-set.unlocked {
  border-color: #cdb394;
  background: #fffaf3;
}

.place-set-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.place-set-title strong {
  color: #78624f;
}

.place-set-bar {
  height: 6px;
  margin: 8px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee5dc;
}

.place-set-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #b9a089;
}

.place-set small {
  color: var(--sub);
  font-size: 9px;
}

.pair-grid,
.near-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}

.pair-card,
.near-pair-card {
  appearance: none;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfa;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.pair-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
}

.pair-avatars {
  display: flex;
}

.pair-avatar.avatar {
  width: 43px;
  height: 43px;
  flex-basis: 43px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.pair-avatar + .pair-avatar {
  margin-left: -12px;
}

.pair-card > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.pair-card strong {
  font-size: 10px;
  line-height: 1.4;
}

.pair-card small {
  color: #8a7461;
  font-size: 9px;
}

.near-pair-card {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 11px;
  align-items: center;
  padding: 10px;
}

.near-pair-images {
  display: flex;
  align-items: center;
  justify-content: center;
}

.near-avatar.avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
}

.near-arrow {
  margin: 0 4px;
  color: #aa927e;
  font-size: 13px;
}

.muted-avatar {
  filter: grayscale(1);
  opacity: .48;
}

.near-pair-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.near-pair-copy strong {
  font-size: 10px;
}

.near-pair-copy small {
  color: #826d5b;
  font-size: 9px;
}

.near-pair-copy span {
  color: var(--sub);
  font-size: 9px;
  line-height: 1.45;
}

.collection-muted {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: #fffdfa;
}

.collection-grid-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 10px;
}

.collection-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.collection-filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: var(--sub);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.collection-filters button.active {
  border-color: #bda48d;
  background: #f4e9dc;
  color: #765f4d;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 8px;
}

.collection-card {
  appearance: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.collection-card.is-owned {
  border-color: #c7a987;
  background: #fffaf2;
  box-shadow: inset 0 0 0 1px rgba(199,169,135,.16);
}

.collection-card.is-unowned .collection-thumb {
  filter: grayscale(.88);
  opacity: .48;
}

.collection-thumb.avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  flex-basis: auto;
  border-radius: 10px;
}

.collection-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.collection-card-copy strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card-copy small {
  color: var(--sub);
  font-size: 8px;
}

.collection-stamp {
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  padding: 2px 5px;
  background: #f0e8e0;
  color: #867464;
  font-size: 7px;
}

.is-owned .collection-stamp {
  background: #eadbc9;
  color: #73583f;
  font-weight: 700;
}

.collection-mini-status {
  display: inline-flex;
  margin: 7px 5px 3px 0;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eeeae6;
  color: #887d75;
  font-size: 9px;
}

@media (max-width: 700px) {
  .collection-panel {
    grid-template-columns: 1fr;
    margin-top: -12px;
  }

  .collection-actions {
    justify-content: space-between;
  }

  .collection-count {
    text-align: left;
  }

  .collection-dialog {
    width: calc(100vw - 20px);
  }

  .collection-hero {
    padding: 28px 20px 22px;
  }

  .collection-body {
    padding: 20px 18px 30px;
  }

  .milestone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pair-grid,
  .near-pairs {
    grid-template-columns: 1fr;
  }

  .collection-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .collection-grid-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .place-set-grid {
    grid-template-columns: 1fr;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .near-pair-card {
    grid-template-columns: 92px 1fr;
  }
}


/* === v0.8 outing system === */

.outing-panel {
  border-color: #d7c3ae;
  background:
    radial-gradient(circle at 95% 0%, rgba(225,236,214,.65), transparent 17rem),
    #fffdf9;
}

.outing-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.outing-heading h4 {
  margin-bottom: 3px;
}

.outing-heading p {
  margin: 0;
  color: var(--sub);
  font-size: 11px;
}

.outing-available,
.outing-done {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 700;
}

.outing-available {
  background: #edf3e7;
  color: #647256;
}

.outing-done {
  background: #eee7df;
  color: #78695d;
}

.outing-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.outing-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.outing-controls label > span {
  color: var(--sub);
  font-size: 9px;
}

#outingDestination {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

#outingStartButton {
  min-height: 42px;
  border: 1px solid #bfa488;
  border-radius: 12px;
  padding: 0 16px;
  background: #f5eadc;
  color: #6f5744;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#outingStartButton:hover {
  background: #efe0cf;
}

#outingStartButton:disabled {
  opacity: .55;
  cursor: wait;
}

.outing-hint {
  margin: 11px 0 0;
  color: var(--sub);
  font-size: 10px;
  line-height: 1.55;
}

.outing-result {
  border: 1px solid #dfd0bf;
  border-radius: 15px;
  padding: 13px;
  background: rgba(255,255,255,.76);
}

.outing-result > p {
  font-size: 11px;
  line-height: 1.65;
}

.outing-place {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 9px;
}

.outing-place > span {
  font-size: 22px;
}

.outing-place strong {
  font-size: 14px;
}

.outing-place small {
  color: var(--sub);
  font-size: 9px;
}

.outing-encounter {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  padding: 8px;
  border-radius: 12px;
  background: #f7f2eb;
}

.outing-mini-avatar.avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 11px;
}

.outing-encounter > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.outing-encounter small {
  color: var(--sub);
  font-size: 8px;
}

.outing-encounter strong {
  font-size: 10px;
}

.outing-mood {
  color: #75675b;
}

.outing-souvenir {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px dashed #d2bda7;
  border-radius: 12px;
  background: #fff9f2;
}

.outing-souvenir span {
  color: var(--sub);
  font-size: 8px;
}

.outing-souvenir strong {
  font-size: 12px;
}

.outing-past {
  margin-top: 13px;
  border-top: 1px dashed var(--line);
  padding-top: 11px;
}

.outing-past-title {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
}

.outing-past-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  gap: 7px;
  padding: 5px 0;
  color: var(--sub);
  font-size: 9px;
}

.outing-note {
  margin: 11px 0 0 !important;
  color: #97887c !important;
  font-size: 8px !important;
  line-height: 1.5 !important;
}

.outing-book-section {
  border: 1px solid #d9c6b1;
  border-radius: 16px;
  padding: 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(225,237,215,.6), transparent 17rem),
    #fffdfa;
}

.outing-book-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.outing-book-head h4 {
  margin-bottom: 4px;
}

.outing-book-head p {
  margin: 0;
  color: var(--sub);
  font-size: 10px;
  line-height: 1.5;
}

.outing-book-stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.outing-book-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  border: 1px solid #dfd2c5;
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(255,255,255,.78);
  color: var(--sub);
  font-size: 7px;
}

.outing-book-stats strong {
  color: #715d4b;
  font-size: 12px;
}

.outing-book-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
  margin-top: 12px;
}

.outing-book-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.outing-book-avatar.avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 10px;
}

.outing-book-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.outing-book-copy strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outing-book-copy small {
  overflow: hidden;
  color: var(--sub);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outing-book-note {
  margin: 11px 0 0 !important;
  color: #96877b !important;
  font-size: 8px !important;
}

@media (max-width: 700px) {
  .outing-book-head {
    flex-direction: column;
  }

  .outing-book-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .outing-controls {
    grid-template-columns: 1fr;
  }

  #outingStartButton {
    width: 100%;
  }

  .outing-book-list {
    grid-template-columns: 1fr;
  }

  .outing-past-row {
    grid-template-columns: 42px 1fr;
  }

  .outing-past-row span:last-child {
    grid-column: 2;
  }
}


/* === play guide page === */

.guide-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 14px;
  border: 1px solid #d8c5b4;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255,255,255,.72);
  color: #725f50;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 5px 16px rgba(88,70,55,.05);
}

.guide-link:hover {
  background: #fff;
  border-color: #bda48d;
}

.footer-guide-link {
  color: inherit;
  text-underline-offset: 3px;
}

.guide-page {
  background:
    radial-gradient(circle at 12% 5%, rgba(240,225,209,.65), transparent 28rem),
    radial-gradient(circle at 95% 5%, rgba(225,238,219,.68), transparent 26rem),
    var(--bg);
}

.guide-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 52px 28px 34px;
}

.guide-back {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--sub);
  font-size: 11px;
  text-decoration: none;
}

.guide-back:hover {
  text-decoration: underline;
}

.guide-hero h1 {
  max-width: 720px;
  font-size: clamp(44px, 8vw, 76px);
  line-height: .98;
}

.mobile-break {
  display: none;
}

.guide-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.9;
}

.guide-main {
  max-width: 920px;
  padding-top: 8px;
}

.guide-start,
.guide-feature,
.guide-wallet,
.guide-note,
.guide-ending {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.91);
  box-shadow: var(--shadow);
}

.guide-start {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 24px 26px;
}

.guide-number {
  color: #c0a992;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.05em;
}

.guide-start h2,
.guide-feature h2,
.guide-wallet h2,
.guide-note h2,
.guide-ending h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.guide-start p,
.guide-feature p,
.guide-wallet p,
.guide-note p,
.guide-ending p {
  margin: 0 0 10px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.85;
}

.guide-start p:last-child,
.guide-feature p:last-child,
.guide-wallet p:last-child,
.guide-note p:last-child,
.guide-ending p:last-child {
  margin-bottom: 0;
}

.guide-feature {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  padding: 28px;
}

.guide-icon {
  font-size: 42px;
  line-height: 1;
}

.guide-kicker {
  margin: 0 0 5px !important;
  color: #a18d7a !important;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: .17em;
}

.guide-mini-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  margin-top: 16px;
}

.guide-mini-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fffaf5;
}

.guide-mini-card strong {
  font-size: 11px;
}

.guide-mini-card span {
  color: var(--sub);
  font-size: 10px;
  line-height: 1.6;
}

.guide-outing-feature {
  border-color: #d7c3ae;
  background:
    radial-gradient(circle at 100% 0%, rgba(225,236,214,.72), transparent 20rem),
    rgba(255,255,255,.94);
}

.guide-places {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0;
}

.guide-places span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255,255,255,.78);
  color: #705f52;
  font-size: 9px;
}

.guide-example {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 15px;
  border: 1px dashed #d5bfa8;
  border-radius: 14px;
  padding: 14px;
  background: #fff9f2;
}

.guide-example small {
  color: var(--sub);
  font-size: 8px;
}

.guide-example strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.guide-example span {
  color: #70655d;
  font-size: 10px;
  line-height: 1.55;
}

.guide-wallet {
  padding: 28px;
  background:
    radial-gradient(circle at 0% 100%, rgba(235,226,217,.7), transparent 20rem),
    rgba(255,255,255,.94);
}

.guide-wallet-list {
  display: grid;
  gap: 7px;
  margin: 17px 0;
}

.guide-wallet-list > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
}

.guide-wallet-list > div span {
  color: #b29c87;
  font-size: 9px;
  font-weight: 700;
}

.guide-wallet-list > div strong {
  font-size: 11px;
}

.guide-safe {
  margin-top: 18px;
  border: 1px solid #d8c7b5;
  border-radius: 14px;
  padding: 14px;
  background: #fbf6f0;
}

.guide-safe strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
}

.guide-safe p {
  font-size: 10px;
}

.guide-note {
  padding: 23px 26px;
}

.guide-note h2 {
  font-size: 16px;
}

.guide-ending {
  padding: 42px 28px;
  text-align: center;
}

.guide-ending > span {
  display: block;
  margin-bottom: 11px;
  font-size: 32px;
}

.guide-ending h2 {
  font-size: 23px;
}

.guide-enter {
  display: inline-flex;
  margin-top: 17px;
  border: 1px solid #bea48d;
  border-radius: 999px;
  padding: 11px 18px;
  background: #f3e7da;
  color: #6d5847;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.guide-enter:hover {
  background: #ebdac9;
}

@media (max-width: 620px) {
  .mobile-break {
    display: block;
  }

  .guide-hero {
    padding: 40px 20px 26px;
  }

  .guide-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .guide-start {
    grid-template-columns: 44px 1fr;
    gap: 11px;
    padding: 19px;
  }

  .guide-number {
    font-size: 23px;
  }

  .guide-feature {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 19px;
  }

  .guide-icon {
    font-size: 34px;
  }

  .guide-mini-grid {
    grid-template-columns: 1fr;
  }

  .guide-wallet,
  .guide-note {
    padding: 21px 19px;
  }

  .guide-ending {
    padding: 32px 19px;
  }
}


/* === v0.9 souvenir book === */

.collection-counters {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.souvenir-count {
  color: #8b7159;
  font-size: 10px;
  font-weight: 700;
}

.collection-button-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.souvenir-button {
  border-color: #d2b894;
  background: #fff8ed;
}

.souvenir-hero {
  background:
    radial-gradient(circle at 85% 0%, rgba(244,222,185,.62), transparent 22rem),
    radial-gradient(circle at 5% 100%, rgba(226,239,217,.52), transparent 20rem),
    var(--soft);
}

.souvenir-book-nav {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 15px;
}

.souvenir-book-nav button,
.souvenir-preview-head button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #786755;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.souvenir-book-nav button:hover,
.souvenir-preview-head button:hover {
  border-color: #bea58d;
  background: #fffaf5;
}

.souvenir-book-locked {
  padding: 44px 24px;
  border: 1px dashed #d7c5b1;
  border-radius: 18px;
  background: #fffaf3;
  text-align: center;
}

.souvenir-lock-icon {
  margin-bottom: 10px;
  font-size: 38px;
  filter: grayscale(.55);
  opacity: .72;
}

.souvenir-book-locked h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.souvenir-book-locked p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--sub);
  font-size: 11px;
  line-height: 1.7;
}

.souvenir-overview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 9px;
}

.souvenir-big-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 105px;
}

.souvenir-big-count strong {
  font-size: 38px;
  line-height: 1;
  color: #765c43;
}

.souvenir-big-count span {
  color: #aa9178;
  font-size: 15px;
}

.souvenir-overview > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.souvenir-overview > div:last-child > strong {
  font-size: 13px;
}

.souvenir-overview > div:last-child > small {
  color: var(--sub);
  font-size: 9px;
}

.souvenir-progress-main {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee4d9;
}

.souvenir-progress-main > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #baa184, #d7b77e);
}

.souvenir-book-help {
  margin: 10px 0 20px;
  color: var(--sub);
  font-size: 10px;
  line-height: 1.6;
}

.souvenir-place-list {
  display: grid;
  gap: 13px;
}

.souvenir-place {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: #fffdfa;
}

.souvenir-place.is-complete {
  border-color: #d1b179;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,222,178,.43), transparent 14rem),
    #fffdf9;
}

.souvenir-place-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.souvenir-place-head > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.souvenir-place-icon {
  font-size: 17px;
}

.souvenir-place-head strong {
  font-size: 12px;
}

.souvenir-place-head > span {
  color: #8a7765;
  font-size: 9px;
  font-weight: 700;
}

.souvenir-complete-badge {
  border-radius: 999px;
  padding: 2px 6px;
  background: #efe1c6;
  color: #896b37;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .06em;
}

.souvenir-place-progress {
  height: 5px;
  margin: 9px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee6de;
}

.souvenir-place-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c9aa7c;
}

.souvenir-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
}

.souvenir-card {
  appearance: none;
  min-width: 0;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.souvenir-card {
  cursor: pointer;
}

button.souvenir-card:hover {
  border-color: #c9ab8c;
  transform: translateY(-1px);
}

.souvenir-card.is-locked {
  background: #f4f1ed;
  opacity: .57;
}

.souvenir-object {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: #f7eee4;
  font-size: 24px;
}

.is-locked .souvenir-object {
  background: #e8e5e1;
  color: #a8a29c;
  font-size: 20px;
}

.souvenir-card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.souvenir-card-copy strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.souvenir-card-copy small {
  color: var(--sub);
  font-size: 7px;
}

.souvenir-card-copy span {
  overflow: hidden;
  color: #7f6c5c;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.souvenir-card-copy em {
  width: fit-content;
  margin-top: 3px;
  border-radius: 999px;
  padding: 2px 5px;
  background: #f1e2cb;
  color: #81643f;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.souvenir-preview-section {
  border: 1px solid #ddcbb6;
  border-radius: 15px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,225,190,.45), transparent 16rem),
    #fffdfa;
}

.souvenir-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.souvenir-preview-head h4 {
  margin-bottom: 3px;
}

.souvenir-preview-head p {
  margin: 0;
}

.souvenir-preview-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
}

.souvenir-preview-progress > strong {
  font-size: 12px;
}

.souvenir-preview-progress > span {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee4da;
}

.souvenir-preview-progress > span > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c9a771;
}

.souvenir-preview-progress > small {
  color: var(--sub);
  font-size: 8px;
}

/* Guide addition */
.guide-souvenir-feature {
  border-color: #dcc7a8;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,224,186,.57), transparent 20rem),
    rgba(255,255,255,.94);
}

@media (max-width: 700px) {
  .collection-actions {
    align-items: stretch;
  }

  .collection-counters {
    align-items: flex-start;
  }

  .collection-button-row {
    justify-content: flex-start;
  }

  .souvenir-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 440px) {
  .collection-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .collection-button-row .collection-button {
    width: 100%;
    padding-left: 9px;
    padding-right: 9px;
  }

  .souvenir-preview-head {
    flex-direction: column;
  }

  .souvenir-preview-progress {
    grid-template-columns: auto 1fr;
  }

  .souvenir-preview-progress > small {
    grid-column: 1 / -1;
  }
}


/* === v1.0 Nemo jobs === */

.coin-count {
  color: #9a7439;
  font-size: 10px;
  font-weight: 800;
}

.job-button {
  border-color: #c8b88c;
  background: #fbf6e5;
}

.job-panel {
  border-color: #d6c59b;
  background:
    radial-gradient(circle at 100% 0%, rgba(247,235,184,.55), transparent 17rem),
    #fffdf8;
}

.job-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 13px;
}

.job-heading h4 {
  margin-bottom: 3px;
}

.job-heading p {
  margin: 0;
  color: var(--sub);
  font-size: 11px;
}

.job-available,
.job-done {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 700;
}

.job-available {
  background: #f6edc9;
  color: #826c2f;
}

.job-done {
  background: #eee9dc;
  color: #786d55;
}

.job-controls {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: end;
}

.job-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.job-controls label > span {
  color: var(--sub);
  font-size: 9px;
}

#jobSelect {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

#jobStartButton {
  min-height: 42px;
  border: 1px solid #c6ad6b;
  border-radius: 12px;
  padding: 0 16px;
  background: #f6e9b9;
  color: #745d27;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

#jobStartButton:hover {
  background: #f0dfa3;
}

#jobStartButton:disabled {
  opacity: .55;
  cursor: wait;
}

.job-hint,
.job-note {
  color: var(--sub);
  line-height: 1.55;
}

.job-hint {
  margin: 10px 0 0 !important;
  font-size: 10px !important;
}

.job-note {
  margin: 11px 0 0 !important;
  font-size: 8px !important;
}

.job-result {
  border: 1px solid #decf9f;
  border-radius: 15px;
  padding: 13px;
  background: rgba(255,255,255,.78);
}

.job-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-result-title > span {
  font-size: 27px;
}

.job-result-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-result-title strong {
  font-size: 13px;
}

.job-result-title small {
  color: var(--sub);
  font-size: 8px;
}

.job-result > p {
  margin: 11px 0;
  font-size: 11px;
  line-height: 1.65;
}

.job-reward-breakdown {
  display: grid;
  gap: 4px;
  border-top: 1px dashed var(--line);
  padding-top: 9px;
}

.job-reward-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--sub);
  font-size: 9px;
}

.job-reward-breakdown strong {
  color: #7a6845;
}

.job-reward-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff4c8;
}

.job-reward-total span {
  color: #7c6d45;
  font-size: 9px;
}

.job-reward-total strong {
  color: #725617;
  font-size: 12px;
}

.job-history {
  margin-top: 13px;
  border-top: 1px dashed var(--line);
  padding-top: 11px;
}

.job-history-title {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
}

.job-history-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 7px;
  padding: 5px 0;
  color: var(--sub);
  font-size: 9px;
}

.job-hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(248,232,165,.68), transparent 22rem),
    radial-gradient(circle at 0% 100%, rgba(229,239,219,.55), transparent 20rem),
    var(--soft);
}

.job-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
  margin-bottom: 25px;
}

.job-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 8px;
  background: #fffdfa;
}

.job-stat-card.is-coin {
  border-color: #d6bc72;
  background: #fff7d8;
}

.job-stat-card span {
  color: var(--sub);
  font-size: 8px;
}

.job-stat-card strong {
  font-size: 22px;
  color: #715d43;
}

.job-stat-card small {
  color: var(--sub);
  font-size: 7px;
}

.job-book-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
}

.job-book-row {
  appearance: none;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.job-book-avatar.avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 10px;
}

.job-book-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-book-copy strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-book-copy small {
  color: var(--sub);
  font-size: 8px;
}

.job-book-coin {
  color: #86671e;
  font-size: 9px;
  white-space: nowrap;
}

.job-catalog {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
}

.job-catalog-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  background: #fffdfa;
}

.job-catalog-card > span {
  font-size: 22px;
}

.job-catalog-card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-catalog-card strong {
  font-size: 9px;
}

.job-catalog-card small {
  color: var(--sub);
  font-size: 8px;
}

.job-economy-note {
  margin-top: 22px;
  border: 1px dashed #d2bd7d;
  border-radius: 14px;
  padding: 13px;
  background: #fff9e6;
}

.job-economy-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
}

.job-economy-note p {
  margin: 0;
  color: var(--sub);
  font-size: 9px;
  line-height: 1.6;
}

.job-book-locked {
  padding: 44px 24px;
  border: 1px dashed #d4c69e;
  border-radius: 18px;
  background: #fffaf0;
  text-align: center;
}

.job-book-locked > div {
  margin-bottom: 8px;
  font-size: 38px;
}

.job-book-locked h4 {
  margin: 0 0 7px;
  font-size: 15px;
}

.job-book-locked p {
  margin: 0;
  color: var(--sub);
  font-size: 10px;
}

.job-preview-section {
  border: 1px solid #dbc88d;
  border-radius: 15px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(247,232,177,.5), transparent 17rem),
    #fffdfa;
}

.job-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.job-preview-head h4 {
  margin-bottom: 3px;
}

.job-preview-head p {
  margin: 0;
}

.job-preview-head button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #786755;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.job-preview-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
  margin-top: 12px;
}

.job-preview-stats > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px;
  background: rgba(255,255,255,.78);
}

.job-preview-stats > span.coin {
  border-color: #d9bf76;
  background: #fff7d6;
}

.job-preview-stats strong {
  font-size: 15px;
}

.job-preview-stats small {
  color: var(--sub);
  font-size: 7px;
}

/* Guide */
.guide-job-feature {
  border-color: #dcc88b;
  background:
    radial-gradient(circle at 100% 0%, rgba(247,232,176,.58), transparent 20rem),
    rgba(255,255,255,.94);
}

@media (max-width: 700px) {
  .job-controls {
    grid-template-columns: 1fr;
  }

  #jobStartButton {
    width: 100%;
  }

  .job-book-list,
  .job-catalog {
    grid-template-columns: 1fr;
  }

  .job-preview-head {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .collection-button-row {
    grid-template-columns: 1fr;
  }

  .job-dashboard {
    grid-template-columns: repeat(3,1fr);
  }

  .job-history-row {
    grid-template-columns: 42px 1fr;
  }

  .job-history-row span:last-child {
    grid-column: 2;
  }
}
