.asset-card { margin: 24px 0; padding: 20px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-surface); color: var(--ui-ink); }
.asset-card :is(h2,h3) { margin: 0 0 12px; font: 700 20px/1.5 var(--serif); letter-spacing: -.03em; }
.asset-card p { font: 400 15px/1.75 var(--sans); }
.asset-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 14px; border: 1px solid var(--ui-line); border-radius: var(--ui-control-radius); background: var(--ui-surface); color: var(--ui-ink); font: 600 14px/1.5 var(--sans); text-align: center; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.asset-action:hover:not(:disabled) { border-color: var(--ui-action); }
.asset-action:disabled { opacity: .5; cursor: default; }
:is(.asset-action,.memory-card,.asset-tabs button):focus-visible { outline: 2px solid var(--ui-action); outline-offset: 3px; }
.asset-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-soft); }
.asset-tabs button { min-width: 0; min-height: 48px; padding: 10px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--ui-muted); font: 500 14px/1.5 var(--sans); cursor: pointer; }
.asset-tabs button[aria-selected=true] { background: var(--ui-surface); color: var(--ui-action); font-weight: 700; box-shadow: 0 1px 4px #302b2614; }
.stone-summary { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 16px; align-items: center; }
.gaho-gem { display: grid; place-items: center; font: 52px/1 var(--sans); color: #477d76; }
.element-fire { color: #b95556; }.element-earth { color: #967635; }.element-metal { color: #737b84; }.element-water { color: #334967; }
.gaho-info { min-width: 0; }.gaho-info strong { font-size: 16px; }.gaho-info p { margin: 6px 0; }.gaho-info small { display: block; color: var(--ui-muted); font: 400 13px/1.6 var(--sans); }
.asset-card progress { display: block; width: 100%; height: 8px; margin: 12px 0 6px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: var(--ui-line); color: var(--ui-action); accent-color: var(--ui-action); }
.asset-card progress::-webkit-progress-bar { background: var(--ui-line); }.asset-card progress::-webkit-progress-value { background: var(--ui-action); border-radius: 999px; }.asset-card progress::-moz-progress-bar { background: var(--ui-action); border-radius: 999px; }
.asset-card details { margin-top: 16px; border-top: 1px solid var(--ui-line); padding-top: 8px; }
.asset-card summary { min-height: 44px; padding-block: 10px; cursor: pointer; font: 500 14px/1.7 var(--sans); }
.memory-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.memory-card { min-width: 0; padding: 0; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); overflow: hidden; background: var(--ui-surface); cursor: pointer; text-align: left; color: var(--ui-ink); }
.memory-card img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.memory-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 12px 12px 6px; font: 600 14px/1.6 var(--sans); overflow-wrap: anywhere; }
.memory-card small { display: block; padding: 0 12px 12px; font: 400 13px/1.6 var(--sans); color: var(--ui-muted); overflow-wrap: anywhere; }
.memory-card.is-locked img { filter: grayscale(1); opacity: .65; }
.asset-image-missing { padding: 16px; font-size: 13px; color: var(--ui-muted); }
.asset-dialog { width: min(580px,calc(100% - 32px)); max-height: 85dvh; padding: 24px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-surface); color: var(--ui-ink); overflow-y: auto; box-sizing: border-box; font: 400 15px/1.8 var(--sans); }
.asset-dialog::backdrop { background: #211c18a6; }.asset-dialog>button { float: right; min-height: 44px; }.asset-dialog h3 { padding-right: 60px; font-family: var(--serif); }.asset-dialog img { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 12px; }.asset-dialog blockquote { margin: 20px 0; padding-left: 16px; border-left: 2px solid var(--ui-gold); line-height: 1.8; }
.asset-empty { padding: 24px 16px; text-align: center; font: 400 15px/1.8 var(--sans); color: var(--ui-muted); }
.talisman-sheet { position: relative; min-height: 330px; padding: 32px 20px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: url('/images/bg/paper.webp') center/cover,var(--ui-soft); text-align: center; touch-action: pan-y; }
.talisman-sheet h3 { font: 700 21px/1.5 var(--serif); }.talisman-mark { font: 90px/1.4 var(--serif); color: #b43f33; }.talisman-sheet blockquote { margin: 20px 0; font: 400 17px/1.9 var(--serif); }.talisman-seal { display: inline-block; padding: 4px; border: 2px solid #ac392d; color: #ac392d; font-family: var(--serif); animation: asset-seal .55s ease-out; }.talisman-watermark { color: var(--ui-muted); overflow-wrap: anywhere; font-size: 13px; }
.talisman-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; }.asset-status { margin: 8px 0; min-height: 1em; }.asset-benefits { padding: 20px 0; font: 400 14px/1.75 var(--sans); color: var(--ui-muted); }.asset-benefits strong { color: var(--ui-ink); }.asset-benefits p { margin: 8px 0; }.asset-benefits blockquote { margin: 12px 0; line-height: 1.8; }
@keyframes asset-seal { from { transform: scale(1.15); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width:360px) { .asset-card { padding: 16px; }.stone-summary { gap: 12px; } }
@media (prefers-reduced-motion:reduce) { .talisman-seal { animation: none; } }

.asset-error { grid-column: 1/-1; min-width: 0; color: var(--ui-muted); font: 400 15px/1.75 var(--sans); }.asset-error p { margin: 0 0 16px; }

.archive-bulk { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--ui-line); }

/* Quiet paper surfaces and a clear reading hierarchy throughout the collection. */
.archive-screen .asset-tabs { margin-bottom: 24px; padding: 5px; border-color: var(--ui-line); border-radius: 16px; background: color-mix(in srgb,var(--ui-soft) 85%,transparent); }
.archive-screen .asset-tabs button { border-radius: 11px; transition: background .18s ease,color .18s ease; }
.archive-screen .asset-tabs button:hover:not([aria-selected=true]) { color: var(--ui-ink); background: #fffdf866; }
.archive-screen .archive-body { margin-top: 0; }
.archive-summary { display: flex; align-items: baseline; gap: 5px; margin: 0 0 24px; font: 400 14px/1.7 var(--sans); color: var(--ui-muted); }
.archive-summary strong { color: var(--ui-action); font-weight: 700; }
.archive-screen .archive-date-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--ui-muted); font: 600 12px/1.5 var(--sans); letter-spacing: .02em; }
.archive-screen .archive-date-heading::after { content: ''; flex: 1; height: 1px; background: var(--ui-line); }
.archive-screen .archive-date-group + .archive-date-group { margin-top: 28px; }
.archive-screen .archive-list { gap: 14px; }
.archive-screen .archive-card { padding: 22px; border-color: var(--ui-line); border-radius: 20px; background: var(--ui-surface); box-shadow: 0 3px 14px #493d2e04; }
.archive-screen .archive-card-title strong { font-size: 21px; line-height: 1.5; }
.archive-screen .archive-label { padding: 5px 9px; border: 0; background: var(--ui-soft); color: var(--ui-action); font: 600 12px/1.4 var(--sans); }
.archive-screen .archive-birth { margin: 9px 0 4px; color: var(--ui-muted); font: 400 13px/1.7 var(--sans); overflow-wrap: anywhere; }
.archive-screen .archive-created { margin: 0; color: var(--ui-muted); font: 400 12px/1.6 var(--sans); }
.archive-screen .archive-status { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0; padding: 4px 9px; border-radius: 6px; background: var(--ui-soft); font: 500 12px/1.6 var(--sans); }
.archive-screen .archive-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.archive-screen .archive-status.is-ready { color: #42634b; background: #edf2eb; }
.archive-screen .archive-status.is-failed { color: #943e36; background: #f8ede8; }
.archive-screen .archive-links { gap: 8px; padding-top: 14px; border-top: 1px solid var(--ui-line); }
.archive-screen .archive-links:empty { display: none; }
.archive-screen .archive-link { padding: 10px 14px; border-color: var(--ui-line); border-radius: 11px; background: transparent; color: var(--ui-ink); font-weight: 600; line-height: 1.5; cursor: pointer; transition: background .18s ease,border-color .18s ease; }
.archive-screen .archive-link:hover:not(:disabled) { background: var(--ui-soft); border-color: var(--ui-action); }
.archive-screen .archive-link.is-primary { border-color: var(--ui-action); background: var(--ui-action); color: #fffdf8; }
.archive-screen .archive-link.is-primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--ui-action); }
.archive-screen .archive-link.is-danger { border-color: transparent; color: var(--ui-muted); font-weight: 400; }
.archive-screen .archive-link.is-danger:hover:not(:disabled) { color: #943e36; background: #f8ede8; }
.archive-screen .archive-links > .is-danger { margin-left: auto; }
.archive-screen .archive-link:disabled { opacity: .5; cursor: wait; }
.archive-screen :is(.archive-link,.archive-kakao,.archive-account button,.asset-card summary):focus-visible { outline: 2px solid var(--ui-action); outline-offset: 4px; }
.archive-screen .archive-empty { gap: 12px; padding: 36px 24px; border-radius: 22px; background: linear-gradient(150deg,#fffdfa,var(--ui-surface)); }
.archive-empty-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border: 1px solid var(--ui-line); border-radius: 18px; background: var(--ui-soft); color: var(--ui-action); font: 400 28px/1 var(--serif); }
.archive-screen .archive-empty strong { color: var(--ui-ink); font-size: 21px; line-height: 1.5; letter-spacing: -.04em; word-break: keep-all; }
.archive-screen .archive-empty p { max-width: 320px; color: var(--ui-muted); font: 400 14px/1.85 var(--sans); }
.archive-screen .archive-empty :is(.ui-button,.archive-kakao) { margin-top: 8px; min-height: 48px; }
.archive-screen :is(.archive-kakao,.asset-error > a.asset-action) { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: min(100%,240px); min-height: 48px; margin: 8px auto 0; padding: 10px 16px; border: 0; border-radius: 12px; background: #fee500; color: #191600; font: 700 14px/1.5 var(--sans); text-align: center; text-decoration: none; }
.archive-screen :is(.archive-kakao,.asset-error > a.asset-action):hover { background: #f5d900; }
.archive-screen .asset-card { padding: 24px; border-radius: 22px; box-shadow: 0 3px 14px #493d2e04; }
.archive-screen .asset-card :is(h2,h3) { margin-bottom: 16px; font-size: 22px; }
.archive-screen .asset-card p { font-size: 14px; line-height: 1.85; }
.archive-screen .gaho-gem { width: 56px; height: 64px; border-radius: 18px; background: var(--ui-soft); font-size: 38px; }
.archive-screen .asset-benefits { padding: 8px 4px 20px; }
.archive-screen .archive-account { gap: 24px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ui-line); }
.archive-screen .archive-account button { color: var(--ui-muted); text-decoration: none; }
.archive-screen .archive-account button:hover { text-decoration: underline; text-underline-offset: 4px; }
.memory-card { transition: border-color .18s ease,box-shadow .18s ease; }
.memory-card:hover { border-color: var(--ui-action); box-shadow: 0 4px 16px #493d2e0c; }
@media (max-width: 400px) {
  .archive-screen .archive-card { padding: 18px 16px; }
  .archive-screen .archive-empty { padding: 28px 18px; }
  .archive-screen .archive-empty strong { font-size: 19px; }
  .archive-screen .asset-card { padding: 20px 16px; }
  .archive-screen .archive-links { gap: 6px; }
  .archive-screen .archive-link { padding-inline: 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-screen .asset-tabs button,.archive-screen .archive-link,.memory-card { transition: none; }
}

/* 사주 기록 아래의 내 명식 보기·수정 */
.archive-self { margin-top: 28px; }
.archive-self-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: 12px; font: 400 14px/1.6 var(--sans); }
.archive-self-card strong { font-weight: 700; }
.archive-self-card span { color: var(--ui-muted); }
.archive-self-pillars { letter-spacing: .08em; }
.archive-self-actions { display: flex; gap: 8px; margin-top: 8px; }
.archive-self-form { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: 12px; font: 400 14px/1.6 var(--sans); }
.archive-self-field { display: grid; gap: 4px; }
.archive-self-field span { color: var(--ui-muted); font-size: 13px; }
.archive-self-field input[type="text"], .archive-self-field input[type="date"], .archive-self-field input[type="time"], .archive-self-field select { min-height: 40px; padding: 0 10px; border: 1px solid var(--ui-line); border-radius: 8px; font: inherit; background: transparent; color: inherit; }
.archive-self-field input[type="checkbox"] { width: 20px; height: 20px; justify-self: start; }
.archive-self-note, .archive-self-status { margin: 0; font-size: 13px; color: var(--ui-muted); }

/* 보관함 맨 위 내 명식 카드: 사주 네 기둥을 크게, 결과 보기는 가로 전체 폭 주 버튼. */
.archive-self { margin: 0 0 24px; }
.self-card { display: grid; gap: 14px; padding: 18px 16px; border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-surface); box-shadow: 0 3px 14px #493d2e0a; }
.self-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.self-who { display: grid; gap: 3px; min-width: 0; }
.self-who small { color: var(--ui-gold); font: 600 12px/1.5 var(--sans); letter-spacing: .06em; }
.self-who strong { color: var(--ui-ink); font: 700 22px/1.35 var(--serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.self-who span { color: var(--ui-muted); font: 400 13px/1.6 var(--sans); }
.self-edit { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-soft); color: var(--ui-muted); font-size: 18px; cursor: pointer; }
.self-edit:hover { border-color: var(--ui-gold); color: var(--ui-ink); }
.self-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.self-pillar { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 108px; padding: 8px 4px; border: 1px solid var(--ui-line); border-radius: 12px; background: #fffdf8; }
.self-pillar small { margin-bottom: 4px; color: var(--ui-muted); font: 600 11px/1.3 var(--sans); }
.self-pillar b { font: 700 30px/1.15 var(--serif); }
.self-pillar.is-day { border: 2px solid #55312d; background: #f6eee2; }
.self-pillar.is-day small { color: #55312d; }
.self-pillar.is-empty { background: var(--ui-soft); border-style: dashed; }
.self-pillar-none { color: var(--ui-muted); font: 500 12px/1.4 var(--sans); }
.self-pillar b.el-wood { color: #4f7a52; } .self-pillar b.el-fire { color: #b5483a; } .self-pillar b.el-earth { color: #9a7a3f; } .self-pillar b.el-metal { color: #6f7680; } .self-pillar b.el-water { color: #3f6b8f; }
.self-open { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #55312d; color: #fff8e9; font: 700 15px/1.4 var(--sans); text-align: center; text-decoration: none; cursor: pointer; }
.self-open:hover { background: #432520; }
.self-card.is-empty { justify-items: center; text-align: center; }
.self-card.is-empty strong { font: 700 18px/1.5 var(--serif); }
.self-card.is-empty p { margin: 0; color: var(--ui-muted); font: 400 14px/1.7 var(--sans); }
.self-sheet { padding: 20px 18px; }
.self-sheet h3 { margin: 0 0 12px; }
.self-form { display: grid; gap: 14px; }
.self-field { display: grid; gap: 8px; }
.self-field > span { color: var(--ui-ink); font: 600 13px/1.4 var(--sans); }
.self-field input[type="text"], .self-field input[type="date"], .self-field input[type="time"] { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); color: var(--ui-ink); font: 400 16px/1.5 var(--sans); }
.self-field input:disabled { background: var(--ui-soft); color: var(--ui-muted); }
.self-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.self-chips.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.self-chip { min-height: 42px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); color: var(--ui-muted); font: 600 14px/1.3 var(--sans); cursor: pointer; }
.self-chip[aria-pressed="true"] { border-color: #55312d; background: #55312d; color: #fff8e9; }
.self-leap { display: flex; align-items: center; gap: 6px; font: 400 14px/1.5 var(--sans); }
.self-leap[hidden] { display: none; }
.self-note { margin: 0; color: var(--ui-muted); font: 400 13px/1.7 var(--sans); }
.self-status { margin: 0; min-height: 1.4em; color: var(--ui-muted); font: 400 13px/1.5 var(--sans); }
.self-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.self-save, .self-cancel { min-height: 48px; border-radius: 12px; font: 700 15px/1.4 var(--sans); cursor: pointer; }
.self-save { border: 0; background: #55312d; color: #fff8e9; } .self-save:disabled { opacity: .6; }
.self-cancel { border: 1px solid var(--ui-line); background: var(--ui-surface); color: var(--ui-ink); }
@media (max-width: 360px) { .self-pillar b { font-size: 26px; } }

.asset-tabs button[hidden], #archive-stone { display: none !important; }

.partner-card { margin-top: 12px; }
.partner-card.is-empty { display: grid; gap: 8px; justify-items: start; }
.partner-card.is-empty p { margin: 0; color: var(--ui-muted); font-size: 13px; }

/* 엽전 기록 */
.coin-log-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.coin-log-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid #e4d9c6; border-radius: 10px; background: #fffdf8; }
.coin-log-main { display: grid; gap: 3px; min-width: 0; }
.coin-log-kind { justify-self: start; padding: 2px 8px; border-radius: 999px; background: #f0e6d4; color: #6a5245; font: 800 11px/1.4 var(--sans, sans-serif); }
.coin-log-item.is-purchase .coin-log-kind { background: #55312d; color: #fff8e9; }
.coin-log-label { color: #2f241a; font: 700 14.5px/1.4 var(--sans, sans-serif); word-break: keep-all; }
.coin-log-time, .coin-log-balance { color: #8a7e6c; font-size: 11.5px; }
.coin-log-side { display: grid; justify-items: end; gap: 3px; flex: none; }
.coin-log-amount { color: #55712f; font: 800 15px/1.3 var(--sans, sans-serif); }

/* 탭이 늘어도 한 줄에 맞춘다: 보이는 탭 수만큼 같은 폭으로 나눈다. */
.asset-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.asset-tabs button { white-space: nowrap; padding-inline: 4px; }
@media (max-width: 360px) { .asset-tabs button { font-size: 13px; } }

.archive-review{display:grid;gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid var(--ui-line)}
.archive-review-title{font-size:16px}.archive-review-reward,.archive-review-note{margin:0;font-size:13px;line-height:1.6;color:#79613e}
.archive-review-stars{display:flex;gap:4px}.archive-review-stars button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;background:transparent;color:#d9d2c8;font-size:32px;cursor:pointer}.archive-review-stars button.is-selected{color:#b78136}.archive-review-stars button:focus-visible{outline:2px solid #87633b;border-radius:8px}
.archive-review label{display:grid;gap:8px;font-size:14px}.archive-review-text{box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid var(--ui-line);border-radius:10px;background:#fffdf8;font:inherit;font-size:16px;line-height:1.6;resize:vertical}.archive-review button[type=submit]{min-height:44px;justify-self:start}.archive-review-note:empty{display:none}
@media(max-width:480px){.archive-review button[type=submit]{width:100%;justify-self:stretch}}
