/* NUSHI — kemajuan & polesan: pencapaian, pengaturan, kartu bagikan, mode foto, cuaca, panduan. */

/* ── tombol HUD tambahan ── */
.ico.gear { display: inline-grid; place-items: center; color: var(--washi); }
.wx { width: 34px; height: 34px; border-radius: 50%; background: var(--wash); color: var(--washi); font-size: 15px; line-height: 1; display: inline-grid; place-items: center; }
.wx:hover { background: rgba(21, 18, 14, 0.86); }
.link { color: var(--shu-d); font: 700 15px var(--sc); letter-spacing: 0.04em; text-decoration: none; padding: 0; }
.link:hover { color: var(--ink); }

/* ── notifikasi pencapaian ── */
/* secarik washi dengan stempel merah */
.unlock { position: fixed; left: 50%; top: 84px; z-index: 26; display: flex; align-items: center; gap: 13px; min-width: 260px; max-width: calc(100vw - 24px); padding: 11px 20px 11px 12px; background: var(--washi) var(--fibre) 0 0 / 320px; border-image: var(--deckle) 60 / 30px / 6px round; filter: drop-shadow(0 12px 22px rgba(10, 8, 5, 0.35)); transform: translate(-50%, -16px); opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s; }
.unlock.show { opacity: 1; transform: translate(-50%, 0); }
.ul-seal { flex: none; width: 42px; height: 42px; display: grid; place-items: center; background: var(--shu); color: var(--washi); font: 400 24px/1 var(--kanji); box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3px rgba(243, 234, 214, 0.75); transform: rotate(-5deg); -webkit-mask: var(--grain) 0 0 / 120px; mask: var(--grain) 0 0 / 120px; }
.unlock small { display: block; font: 700 13px var(--sc); letter-spacing: 0.08em; color: var(--shu-d); }
.unlock b { display: block; font: 800 19px/1.15 var(--display); }
.unlock em { display: block; font: italic 500 14.5px var(--display); color: var(--ink-2); }

/* ── tab Goals ── */
.goals .g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.goals .g-head h3 { margin: 6px 0 8px; }
.g-reset { font: 500 13.5px var(--sc); letter-spacing: 0.03em; color: var(--ink-3); }
.g-daily { display: grid; gap: 0; border-top: 1px solid var(--line); }
.g-day { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.g-day > div { flex: 1; min-width: 0; }
.g-day b { font-size: 15.5px; font-weight: 700; display: block; }
.g-day small { font-size: 13px; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.g-tick { flex: none; width: 24px; height: 24px; box-shadow: inset 0 0 0 1.5px rgba(31, 28, 24, 0.3); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--washi); }
.g-day.ok .g-tick { background: var(--moss); box-shadow: none; transform: rotate(-4deg); }
.g-day.ok b { color: var(--ink-2); }
.gbar { display: block; height: 3px; background: rgba(31, 28, 24, 0.1); margin: 6px 0 4px; overflow: hidden; }
.gbar i { display: block; height: 100%; background: var(--shu); }
.g-day.ok .gbar i { background: var(--moss); }
.g-titles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.g-titles button { padding: 6px 12px 7px; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(31, 28, 24, 0.26); font: 600 15px var(--sc); letter-spacing: 0.03em; }
.g-titles button.on { background: var(--ink); color: var(--washi); box-shadow: none; }
.g-hint { font: italic 500 14.5px var(--display); color: var(--ink-3); }
.g-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.g-a { display: flex; gap: 11px; align-items: flex-start; padding: 10px 11px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); opacity: 0.6; }
.g-a.got { opacity: 1; background: rgba(255, 251, 242, 0.6); box-shadow: inset 0 0 0 1px rgba(184, 137, 47, 0.5); }
.g-a > div { min-width: 0; flex: 1; }
.g-a b { display: block; font: 800 16px var(--display); }
.g-a small { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.g-a em { display: block; font: 700 13px var(--sc); font-style: normal; color: var(--gold); margin-top: 3px; letter-spacing: 0.04em; }
.g-seal { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font: 400 17px/1 var(--kanji); box-shadow: inset 0 0 0 1.5px rgba(31, 28, 24, 0.25); color: var(--ink-3); transform: rotate(-4deg); }
.g-a.got .g-seal { background: var(--shu); color: var(--washi); box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3px rgba(243, 234, 214, 0.7); }
.g-fine { font-size: 13.5px !important; color: var(--ink-3) !important; margin-top: 14px; }

/* ── menu: alat ── */
.menu-tools { position: relative; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; }
.menu-tools::before { top: 0; }
.menu-tools button { flex: 1 1 0; min-width: 96px; height: 42px; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(31, 28, 24, 0.3); font: 600 15px var(--sc); letter-spacing: 0.04em; color: var(--ink-2); }
.menu-tools button:hover { background: rgba(31, 28, 24, 0.07); color: var(--ink); }

/* ── pengaturan ── */
.set-card h2 { margin-bottom: 6px; }
.set-row { margin: 14px 0; }
.set-row .lbl { display: block; font: 600 14px var(--sc); color: var(--ink-3); letter-spacing: 0.08em; margin-bottom: 7px; }
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
.set-note { font-size: 13.5px; color: var(--ink-3); margin: 7px 0 0; min-height: 1.2em; }
.rng { display: flex; align-items: center; gap: 12px; }
.rng input { flex: 1; accent-color: var(--ink); height: 28px; }
.rng input:disabled { opacity: 0.35; }
.rng output { font: 700 14px var(--ui); font-variant-numeric: lining-nums tabular-nums; min-width: 42px; text-align: right; color: var(--ink-2); }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; cursor: pointer; font-size: 15.5px; font-weight: 500; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
/* sakelar: alur kayu persegi + kenop washi */
.tog i { flex: none; width: 44px; height: 24px; border-radius: var(--r); background: rgba(31, 28, 24, 0.16); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18); position: relative; transition: background 0.2s; }
.tog i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 1px; background: #fffaf0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.tog input:checked + i { background: var(--ink); }
.tog input:checked + i::after { transform: translateX(18px); }
.tog input:focus-visible + i { outline: 2px solid var(--shu); outline-offset: 2px; }
.set-togs { position: relative; padding-top: 10px; }
.set-togs::before { top: 0; }
.set-btns { display: flex; gap: 8px; }
.set-btns .ghost { flex: 1; }

/* ── kartu bagikan ── */
.share-card .sh-prev { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--washi-2); margin: 4px 0 14px; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.14); }
.share-card .sh-prev img { width: 100%; height: 100%; display: block; }
.share-card .sh-prev img:not([src]) { visibility: hidden; }
.sh-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-btns .primary { flex: 2 1 200px; width: auto; }
.sh-btns .ghost { flex: 1 1 110px; height: 52px; }

/* ── mode foto ── */
body.photo > *:not(#c):not(.photo-bar):not(.photo-pad):not(.photo-flash):not(.toast) { opacity: 0 !important; pointer-events: none !important; }
.photo-pad { position: fixed; inset: 0; z-index: 40; display: none; touch-action: none; cursor: grab; }
.photo-pad:active { cursor: grabbing; }
body.photo .photo-pad { display: block; }
.photo-bar { position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); z-index: 41; display: none; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 99px; background: rgba(21, 18, 14, 0.6); color: var(--washi); }
body.photo .photo-bar { display: flex; }
.photo-bar.min { display: none !important; }
.pb-hint { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; font: 500 14px var(--sc); letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.88); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.pb-x { white-space: nowrap; height: 36px; padding: 0 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); font: 600 15px var(--sc); letter-spacing: 0.04em; }
.pb-shut { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--washi); display: grid; place-items: center; }
.pb-shut i { width: 48px; height: 48px; border-radius: 50%; background: var(--washi); transition: transform 0.1s; }
.pb-shut:active i { transform: scale(0.88); }
.photo-flash { position: fixed; inset: 0; z-index: 45; background: #fff; pointer-events: none; animation: pflash 0.45s ease-out forwards; }
@keyframes pflash { from { opacity: 0.8; } to { opacity: 0; } }

/* ── panduan pemain baru: secarik label washi yang tergantung pada senar ke sasarannya ── */
.coach { position: fixed; z-index: 27; width: min(300px, calc(100vw - 28px)); padding: 13px 16px 11px; background: var(--washi) var(--fibre) 0 0 / 320px; border-image: var(--deckle) 60 / 30px / 6px round; filter: drop-shadow(0 12px 22px rgba(10, 8, 5, 0.4)); transition: opacity 0.3s; }
.coach[hidden], .coach.away { display: none; }
/* kemajuan = deretan pelampung (uki): merah-putih = sudah/sedang, garis saja = belum */
.cb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.cb-floats { display: inline-flex; align-items: flex-end; gap: 5px; }
.cb-floats i { width: 7px; height: 13px; border-radius: 4px 4px 3px 3px; box-shadow: inset 0 0 0 1.2px rgba(31, 28, 24, 0.45); }
.cb-floats i.on { background: linear-gradient(var(--shu) 52%, #fffaf0 52%); box-shadow: inset 0 0 0 1.2px rgba(31, 28, 24, 0.6); }
.cb-floats i.cur { width: 9px; height: 17px; border-radius: 5px 5px 4px 4px; }
.coach small { font: 700 13px var(--sc); letter-spacing: 0.06em; color: var(--ink-3); font-variant-numeric: lining-nums; }
.coach > b { display: block; font: 800 21px/1.15 var(--display); margin: 0 0 4px; }
.coach p { margin: 0 0 9px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.coach p b { color: var(--ink); }
.coach-b { display: flex; justify-content: space-between; align-items: center; min-height: 30px; }
.coach-b .link { font-size: 14px; color: var(--ink-3); }
.coach-b .link:hover { color: var(--shu-d); }
.cb-next { height: 32px; padding: 0 18px; background: var(--ink); color: var(--washi); font: 700 15px var(--sc); letter-spacing: 0.06em; -webkit-mask: var(--brush) 0 0 / 100% 100%; mask: var(--brush) 0 0 / 100% 100%; }
/* senar ke sasaran + simpul merah di ujungnya */
.coach::after { content: ''; position: absolute; left: calc(var(--ax, 50%) - 0.75px); width: 1.5px; height: 16px; background: rgba(31, 28, 24, 0.75); }
.coach::before { content: ''; position: absolute; left: calc(var(--ax, 50%) - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 2px rgba(243, 234, 214, 0.85); }
.coach.down::after { top: calc(100% + 4px); }
.coach.down::before { top: calc(100% + 16px); }
.coach.up::after { bottom: calc(100% + 4px); }
.coach.up::before { bottom: calc(100% + 15px); }
.coach.free { left: 50% !important; top: 30% !important; transform: translateX(-50%); }
.coach.free::after, .coach.free::before { display: none; }
/* tuts: keping kayu hinoki kecil */
kbd { display: inline-block; min-width: 22px; padding: 1px 6px 2px; margin: 0 2px 2px; border-radius: 3px; background: linear-gradient(#f4e6c8, #e6d2a8); box-shadow: inset 0 0 0 1px rgba(90, 64, 30, 0.38), 0 2px 0 rgba(90, 64, 30, 0.42); font: 800 13px/1.25 var(--sc); letter-spacing: 0.02em; text-align: center; color: var(--ink); vertical-align: 1px; }
.leave-btn kbd { background: var(--washi); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }

/* ── bantuan kontrol ── */
.keys { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 8px; }
.keys td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.keys td:first-child { white-space: nowrap; padding-right: 14px; color: var(--ink-2); }

/* ── kurangi gerak ── */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { transition-duration: 0.01s !important; animation-duration: 0.01s !important; }
body.reduce-motion .flash { display: none; }

/* ── HUD lebih padat: tombol cuaca & roda gigi menambah lebar, jadi rapikan lebih awal ── */
.rv-btns .ghost { white-space: nowrap; padding: 0 10px; }
@media (min-width: 761px) {
  .tide { flex-shrink: 0; }
  .clock { white-space: nowrap; }
}
@media (max-width: 1560px) and (min-width: 1401px) {
  .hide-sm { display: none; }
  .tide .val2 { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 1400px) and (min-width: 1181px) {
  .word { display: none; }
}
/* laptop kecil/tablet: pot pindah ke baris kedua (seperti HP) supaya tidak terpotong */
@media (max-width: 1180px) and (min-width: 761px) {
  #btnSound { display: none; } /* bisu ada di lembar pengaturan */
  .hud { flex-wrap: wrap; row-gap: 8px; }
  .hud-r { gap: 6px; margin-left: auto; order: 3; }
  .pots { order: 4; margin: 0 auto; }
  .mylines { top: 128px; }
  .feed { top: 130px; }
  .unlock { top: 132px; }
}

/* ── HP ── */
@media (max-width: 760px) {
  #btnSound { display: none; } /* bisu ada di lembar pengaturan */
  .wx { order: -2; width: 30px; height: 30px; font-size: 14px; }
  .unlock { top: 158px; left: 10px; min-width: 0; max-width: calc(100vw - 116px); transform: translate(0, -16px); } /* peta mini di kanan */
  .unlock.show { transform: none; }
  .g-ach { grid-template-columns: 1fr; }
  .photo-bar { gap: 10px; padding: 8px 10px; }
  .coach.free { top: 26% !important; }
}
