/* ---------- 結果（履歴書） ---------- */
.rireki {
  background: var(--paper); color: var(--ink);
  font-family: var(--f-doc);
  border: 3px solid #07081a; box-shadow: 0 6px 0 #07081a;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.rireki-h { display: flex; justify-content: space-between; align-items: baseline; }
.rireki-h h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0.8em; }
.rireki-h time { font-size: 12px; color: var(--ink-2); }
.rireki-top { display: grid; grid-template-columns: 1fr 92px; gap: 12px; border: 1px solid var(--ink); }
.rireki-top > div { padding: 8px 0 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rk-label { font-size: 11px; color: var(--ink-2); margin: 0; }
.shogo { font-family: var(--f-disp); font-size: 28px; line-height: 1.2; margin: 0; color: var(--shu); text-wrap: balance; }
.shogo-cond { font-size: 13px; margin: 0; }
.rk-name { margin: 6px 0 0; font-size: 14px; border-top: 1px dotted var(--rule); padding-top: 6px; }
.photo { margin: 8px 8px 8px 0; border: 1px dashed var(--ink-2); display: grid; place-items: center; background: #fff; }
.photo img { width: 80px; height: 80px; }
.hist { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hist th { font-size: 11px; font-weight: 700; text-align: left; border-bottom: 2px solid var(--ink); padding: 4px 4px; color: var(--ink-2); }
.hist td { border-bottom: 1px solid var(--rule); padding: 6px 4px; vertical-align: top; line-height: 1.55; }
.hist td:first-child { width: 42px; font-family: var(--f-disp); font-size: 13px; white-space: nowrap; }
.hist .k { font-weight: 800; }
.hist b { font-family: var(--f-disp); font-weight: 400; }
.rk-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.rk-stats div { padding: 6px 8px; display: flex; flex-direction: column; border-left: 1px solid var(--rule); }
.rk-stats div:first-child { border-left: 0; }
.rk-stats span { font-size: 11px; color: var(--ink-2); }
.rk-stats b { font-family: var(--f-disp); font-weight: 400; font-size: clamp(14px, 4.4vw, 19px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-stats div { min-width: 0; }
.jirei-to .tag { font-style: normal; font-family: var(--f-pix); font-size: 12px; margin-left: 8px; padding: 0 6px; border: 1px solid var(--ink); color: var(--ink); vertical-align: 2px; }
.rk-others { font-size: 13px; margin: 0; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.collection h2 { font-family: var(--f-doc); font-weight: 800; font-size: 16px; margin: 0 0 8px; letter-spacing: 0.2em; display: flex; justify-content: space-between; }
.collection h2 span { font-family: var(--f-pix); font-weight: 400; letter-spacing: 0; font-size: 14px; color: var(--sub); }
.coll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coll li { border: 2px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coll li b { font-family: var(--f-disp); font-weight: 400; font-size: 15px; }
.coll li span { font-size: 12px; color: var(--sub); line-height: 1.5; }
.coll li.got { background: var(--paper); color: var(--ink); border-color: #07081a; }
.coll li.got b { color: var(--shu); }
.coll li.got span { color: var(--ink-2); }
.coll li.now { box-shadow: 0 0 0 3px var(--sr-l); }
.fine { font-size: 12px; color: var(--sub); line-height: 1.7; margin: 0; }
.fine a { color: var(--sub); }
.fine.data summary { cursor: pointer; color: var(--fluor); font-size: 13px; padding: 6px 0; }
.fine.data p { margin: 6px 0 0; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5,6,20,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.modal img { max-width: min(400px, 100%); max-height: 70vh; border: 3px solid #07081a; box-shadow: 0 6px 0 #000; }
.modal p { margin: 0; font-size: 14px; text-align: center; }
.modal .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--paper); color: var(--ink); border: 3px solid #07081a; padding: 8px 14px; z-index: 60; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 隠しUR図鑑 */
.ur-h { margin-top: 18px !important; }
.ur-note { font-size: 12px; color: var(--sub); line-height: 1.6; margin: 0 0 10px; }
.ur-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ur-grid li { display: flex; gap: 8px; align-items: center; border: 2px solid #3a3420; background: #12101c; padding: 6px; min-width: 0; }
.ur-grid li img, .ur-grid li .ur-q { width: 40px; height: 40px; flex: none; image-rendering: pixelated; }
.ur-grid li .ur-q { display: grid; place-items: center; background: #1c1830; color: #5a4a2a; font-family: var(--f-disp); font-style: normal; font-size: 20px; }
.ur-grid li div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ur-grid li em { font-style: normal; font-size: 10px; color: #8a7a4a; letter-spacing: 0.1em; }
.ur-grid li b { font-family: var(--f-doc); font-weight: 800; font-size: 12px; color: #6a6070; line-height: 1.35; }
.ur-grid li span { font-size: 10.5px; color: #8a8494; line-height: 1.45; }
.ur-grid li.got { border-color: #f4d06a; background: #1a1626; box-shadow: inset 0 0 0 1px #5a4a1a; }
.ur-grid li.got b { color: #f4d06a; }

/* URにたどり着いた瞬間 */
.ur-burst { position: relative; display: grid; place-items: center; gap: 6px; padding: 34px 40px 26px; background: radial-gradient(circle at 50% 40%, #3a2e10 0%, #14121e 70%); border: 3px solid #f4d06a; box-shadow: 0 0 0 3px #14121e, 0 0 60px rgba(244, 208, 106, .45); animation: urIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ur-burst b { font-family: var(--f-disp); font-weight: 400; font-size: 76px; line-height: 1; letter-spacing: .06em; background: linear-gradient(180deg, #fff6c8 0%, #f4d06a 45%, #b8862a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #3a2a08); }
.ur-burst span { font-family: var(--f-doc); font-weight: 800; color: #f4e6c0; letter-spacing: .4em; font-size: 15px; margin-left: .4em; }
.ur-burst small { font-family: var(--f-pix); color: #c8a040; font-size: 13px; }
.ur-burst::before, .ur-burst::after { content: ''; position: absolute; inset: -18px; border: 1px solid rgba(244, 208, 106, .35); animation: urRing 1.4s ease-out infinite; }
.ur-burst::after { animation-delay: .5s; }
@keyframes urIn { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes urRing { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ur-burst, .ur-burst::before, .ur-burst::after { animation: none; } }

/* 年金ガチャのスタンプ */
.stamp small { display: block; font-size: 9px; letter-spacing: .1em; line-height: 1; margin-bottom: 1px; }
.line[data-tier="UR"] .stamp, .stamp.t-UR { color: #f4d06a; }

/* 海外赴任中の行 */
.kaigai-line { margin: 10px 4px 2px; padding: 8px 10px; border: 2px dashed #8a6a3a; background: #f8f0dc; color: var(--ink); font-size: 13px; line-height: 1.6; }
.kaigai-line b { display: inline-block; margin-right: 8px; padding: 0 6px; background: #2a3566; color: #fff; font-size: 12px; letter-spacing: .1em; }

/* 結果の札：自動で閉じるまでの残り時間 */
.tapnext.auto { position: relative; padding-top: 8px; }
.tapnext.auto i { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ink); transform-origin: left; animation: autoBar linear forwards; opacity: .35; }
@keyframes autoBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* トースト：止めずに流す小さな出来事 */
.ticks { position: fixed; z-index: 60; top: calc(8px + env(safe-area-inset-top)); left: 0; right: 0; display: grid; gap: 6px; justify-items: center; pointer-events: none; padding: 0 12px; }
.tick { pointer-events: auto; width: min(100%, 420px); display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; background: var(--paper); color: var(--ink); border: 2px solid #07081a; box-shadow: 0 4px 0 #07081a; padding: 8px 10px; animation: tickIn .28s cubic-bezier(.2, 1.3, .4, 1) both; }
.tick:not(:has(img)) { grid-template-columns: 1fr; }
.tick img { width: 40px; height: 40px; image-rendering: pixelated; border: 2px solid var(--ink); }
.tick b { font-family: var(--f-doc); font-weight: 800; font-size: 14px; display: block; }
.tick p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.tick .deltas { margin-top: 4px; }
.tick.tone-good { border-color: #2a6a3a; box-shadow: 0 4px 0 #2a6a3a; }
.tick.out { animation: tickOut .4s ease forwards; }
@keyframes tickIn { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tickOut { to { transform: translateY(-40%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tick, .tick.out { animation: none; } }

/* 冤罪モードの切り替え */
.enzai-opt { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border: 2px solid #5a2a2a; background: #1a1014; cursor: pointer; }
.enzai-opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #c83a3a; flex: none; }
.enzai-opt b { display: block; font-family: var(--f-doc); font-weight: 800; color: #f0d8d0; font-size: 15px; letter-spacing: .1em; }
.enzai-opt small { display: block; color: #b8a8b0; font-size: 12px; line-height: 1.6; margin-top: 2px; }
.enzai-opt:has(input:checked) { border-color: #c83a3a; background: #2a1418; box-shadow: inset 0 0 0 1px #c83a3a; }

/* 1年1枚の年表 */
.sheet { position: fixed; z-index: 26; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; pointer-events: none; }
.sheet[hidden] { display: none; }
.sheet-paper { pointer-events: auto; width: min(100%, 480px); max-height: 72vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: 3px solid #07081a; border-bottom: 0; box-shadow: 0 -10px 0 rgba(0, 0, 0, .28); transform: translateY(100%); transition: transform .34s cubic-bezier(.2, 1, .3, 1); }
.sheet.on .sheet-paper { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 18px 6px; border-bottom: 2px solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(7, 8, 26, .04) 6px 7px); }
.sheet-head b { font-family: var(--f-disp); font-weight: 400; font-size: 22px; letter-spacing: .04em; }
.sheet-head span { font-family: var(--f-disp); font-size: 18px; color: var(--shu); }
.sheet-body { overflow-y: auto; padding: 10px 18px 14px 26px; display: grid; gap: 4px; overscroll-behavior: contain; }
.ent { position: relative; padding: 8px 0 10px 16px; border-left: 3px solid var(--rule); animation: entIn .3s ease both; }
.ent::before { content: ''; position: absolute; left: -9px; top: 13px; width: 9px; height: 9px; background: var(--paper); border: 3px solid var(--ink); }
.ent.tone-heavy { border-left-color: #4a4c5c; }
.ent.tone-heavy::before { background: #4a4c5c; }
.ent.tone-good::before { background: #f4d06a; border-color: #8a6a1a; }
.ent-top { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.ent-top:not(:has(img)) { grid-template-columns: 1fr; }
.ent-top img { width: 44px; height: 44px; border: 2px solid var(--ink); image-rendering: pixelated; background: #fff; }
.ent h4 { margin: 0 0 2px; font-family: var(--f-doc); font-weight: 800; font-size: 16px; line-height: 1.4; }
.ent p { margin: 0; font-size: 14px; line-height: 1.75; }
.ent.light { padding-bottom: 6px; }
.ent.light .ent-top { grid-template-columns: 32px 1fr; }
.ent.light .ent-top img { width: 32px; height: 32px; }
.ent.light h4 { font-size: 14px; }
.ent.light p { font-size: 13px; color: var(--ink-2); }
.ent .nt-choices { margin-top: 10px; }
.ent .chosen { margin: 8px 0 0; font-family: var(--f-pix); font-size: 13px; color: var(--shu); }
.ent.res { border-left: 0; padding: 4px 0 0 12px; margin-top: 6px; border-top: 1px dashed var(--rule); animation-duration: .4s; }
.ent.res::before { display: none; }
.ent .deltas { margin-top: 6px; }
.ent .nt-fact { margin-top: 6px; }
.ent .swap { display: flex; align-items: center; gap: 10px; padding: 6px 0 2px; }
.ent .swap figure { margin: 0; display: grid; justify-items: center; gap: 2px; font-family: var(--f-disp); font-size: 13px; }
.ent .swap img { width: 56px; height: 56px; border: 2px solid var(--ink); }
.ent .swap .arrow { font-family: var(--f-disp); color: var(--shu); }
.ent .swap-t { font-size: 13px; }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 2px dashed var(--rule); background: var(--paper); }
.sheet-foot[hidden] { display: none; }
.sheet-foot .btn-sub, .sheet-foot .btn-main { margin: 0; width: 100%; }
.sheet-foot .sh-next[hidden] { display: none; }
.sheet-foot:has(.sh-next[hidden]) { grid-template-columns: 1fr; }
@keyframes entIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ent { animation: none; } .sheet-paper { transition: none; } }

.yr-div { margin: 14px 0 4px -26px; padding: 4px 0 4px 26px; font-family: var(--f-disp); font-size: 15px; letter-spacing: .04em; color: var(--ink); border-top: 2px solid var(--ink); }
.yr-sum { margin: 6px 0 4px; padding: 6px 10px; background: rgba(7, 8, 26, .05); font-size: 12.5px; color: var(--ink-2); }
.yr-sum .quiet { margin: 0 0 2px; font-size: 14px; color: var(--ink); }
.yr-sum b { font-family: var(--f-pix); font-weight: 400; }
.yr-sum b.pos { color: #2a7a3a; }
.yr-sum b.neg { color: var(--shu); }

/* 日本の平均と比べると */
.compare { margin-top: 16px; padding-top: 12px; border-top: 1px dotted var(--rule); }
.compare h2 { margin: 0 0 8px; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th { text-align: left; vertical-align: top; width: 7.5em; padding: 8px 8px 8px 0; font-family: var(--f-doc); font-weight: 800; font-size: 13px; border-bottom: 1px solid var(--rule); }
.compare td { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13px; line-height: 1.6; }
.compare td b { display: block; font-family: var(--f-disp); font-weight: 400; font-size: 17px; }
.compare td span { display: block; color: var(--sub); }
.compare cite { display: block; font-style: normal; font-size: 10.5px; color: var(--sub); opacity: .8; }
.cmp-bar { position: relative; display: block; height: 6px; margin: 5px 0 3px; background: rgba(255, 255, 255, .12); }
.cmp-bar em { position: absolute; left: 0; top: 0; bottom: 0; background: #6a8ad8; }
.cmp-bar em.up { background: #3ab06a; }
.cmp-bar em.down { background: #d8442e; }
.cmp-bar u { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: #f4f2ea; }
.cmp-note { font-size: 11px; color: var(--sub); margin: 6px 0 0; }

