/* 외부 글꼴을 불러오지 않는다(오프라인·개인정보) — 기기 글꼴(Android 는 Noto CJK)을 쓴다 */
:root {
  --bg: #f6f4ee;
  --paper: #fffefa;
  --ink: #263b32;
  --muted: #768078;
  --line: #e5e5dc;
  --green: #334e42;
  --sage: #e8ece4;
  --gold: #b39465;
  --brown: #89694e;
  --radius: 22px;
  --shadow: 0 8px 30px #283e3210;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px 'Noto Sans KR',
    system-ui,
    sans-serif;
  line-height: 1.7;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  vertical-align: middle;
}
.ico {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
.serif {
  font-family: 'Noto Serif KR', Georgia, serif;
}
h1 {
  font-size: 33px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -1.3px;
}
h2 {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--brown);
  text-transform: uppercase;
}
.side {
  position: fixed;
  width: 232px;
  inset: 0 auto 0 0;
  background: #fdfcf8;
  border-right: 1px solid var(--line);
  padding: 42px 24px 22px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px 45px;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand strong {
  font:
    600 28px 'Noto Serif KR',
    serif;
  letter-spacing: 4px;
}
.brand small {
  font-size: 9px;
  letter-spacing: 3px;
  display: block;
}
.side nav {
  display: grid;
  gap: 8px;
}
.navlink {
  padding: 13px 17px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #7c837a;
  font-size: 14px;
}
.navlink.active {
  color: var(--green);
  background: #e9eee5;
  font-weight: 600;
}
.navlink:hover {
  background: #eef0e9;
}
.side-bottom {
  margin-top: auto;
}
.side-quote {
  margin: 28px 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font:
    14px/2.1 'Noto Serif KR',
    serif;
  color: #8a8e80;
}
.side-bottom .navlink {
  font-size: 12px;
  padding: 10px 17px;
}
.side-footer {
  font-size: 10px;
  color: #9c9f94;
  margin: 22px 15px 0;
  letter-spacing: 1px;
}
.layout {
  margin-left: 232px;
}
.topbar {
  height: 88px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pill {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #889d78;
}
.iconbtn {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6e8de;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.main {
  padding: 34px 44px 60px;
  max-width: 1530px;
  margin: auto;
  min-height: calc(100vh - 88px);
}
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 27px;
}
.welcome p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
}
.welcome .eyebrow {
  margin-bottom: 9px;
}
.date {
  font-size: 11px;
  color: var(--muted);
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 26px;
}
.hero {
  position: relative;
  min-height: 365px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dbe4d6;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #e4e9deee 0%, #e4e9de88 40%, transparent 73%);
  z-index: -1;
}
.hero-copy {
  padding: 34px 32px;
  max-width: 380px;
}
.hero-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 17px;
}
.hero h2 {
  font-size: 31px;
  line-height: 1.6;
}
.hero p {
  font-size: 12px;
  color: #596d5e;
  margin: 12px 0 23px;
  line-height: 1.9;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fffdf5;
  padding: 12px 21px;
  border-radius: 10px;
  min-height: 46px;
  font-size: 12px;
}
.btn:hover {
  filter: brightness(1.09);
}
.btn.light {
  color: var(--green);
  background: var(--paper);
  border-color: var(--line);
}
.btn.ghost {
  color: var(--green);
  background: transparent;
  border-color: var(--line);
}
.btn.danger {
  background: #935b4e;
  border-color: #935b4e;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.textbtn {
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.hero-foot {
  position: absolute;
  bottom: 21px;
  left: 32px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #667761;
}
.scene-badge {
  background: #ffffff99;
  padding: 5px 10px;
  border-radius: 20px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0 15px;
}
.section-head h2 {
  font-size: 19px;
}
.section-head a {
  font-size: 11px;
  color: var(--muted);
}
.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 120px;
  padding: 19px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  transition: transform 0.2s;
}
.tool:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tool-icon {
  color: #7d8f75;
  margin-bottom: 2px;
}
.tool strong {
  font-size: 13px;
}
.tool small {
  font-size: 10px;
}
.continue {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 17px;
  align-items: center;
}
.continue-art {
  width: 65px;
  height: 65px;
  background: #e9e6da;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #8d7859;
  flex-shrink: 0;
}
.continue .copy {
  flex: 1;
}
.continue small {
  font-size: 10px;
}
.continue h3 {
  font-size: 13px;
  margin: 3px 0 8px;
}
.bar {
  height: 4px;
  border-radius: 5px;
  background: #eceee5;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: #91a284;
  border-radius: 5px;
}
.circle-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage);
  border: 0;
  display: grid;
  place-items: center;
  color: var(--green);
}
.card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 23px;
}
.card p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.rightcol {
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.week {
  display: flex;
  justify-content: space-between;
  margin: 22px 0 16px;
}
.day {
  text-align: center;
  font-size: 10px;
  color: #9b9d91;
}
.day b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  margin-top: 8px;
  font-weight: 400;
}
.day.done b {
  background: #72856a;
  color: white;
}
.day.today b {
  border: 1px solid #7d8d71;
  color: var(--green);
}
.mini-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 15px 0 10px;
}
.quote-card {
  background: #eeeee4;
  text-align: center;
  padding: 24px 22px;
}
.quote-mark {
  font-family: Georgia, serif;
  font-size: 35px;
  height: 36px;
  color: #9d967d;
}
.quote-card blockquote {
  font:
    15px/2 'Noto Serif KR',
    serif;
  margin: 9px 0 13px;
}
.quote-card small {
  font-size: 10px;
}
.temple-mini {
  padding: 0;
  overflow: hidden;
}
.temple-mini .mini-scene {
  height: 110px;
  overflow: hidden;
  background: #dce2d5;
  position: relative;
}
.temple-mini .mini-scene svg {
  width: 100%;
  height: 100%;
}
.temple-mini .mini-body {
  padding: 18px 21px;
}
.tag {
  display: inline-block;
  border-radius: 5px;
  background: var(--sage);
  padding: 3px 7px;
  font-size: 10px;
  color: #6c7b65;
}
.tag.gold {
  background: #f2eadc;
  color: #97774e;
}
.temple-mini h3 {
  font:
    17px 'Noto Serif KR',
    serif;
  margin-top: 9px;
}
.temple-mini a {
  display: flex;
  justify-content: space-between;
  margin-top: 13px;
  font-size: 11px;
  color: #7d8274;
}
.footer-line {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9b9e90;
  font-size: 10px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.back {
  border: 0;
  background: none;
  padding: 0;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stack {
  display: grid;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.row.start {
  justify-content: flex-start;
}
.row.wrap {
  flex-wrap: wrap;
}
.listrow {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}
.listrow:last-child {
  border-bottom: 0;
}
.listrow .grow {
  flex: 1;
}
.listrow p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.listrow h3 {
  font-size: 14px;
}
.square {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sage);
  color: #7b8b71;
  flex-shrink: 0;
}
.tabs,
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 21px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  padding: 8px 16px;
  font-size: 12px;
  min-height: 40px;
}
.chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.field {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.field label {
  font-size: 12px;
  font-weight: 500;
}
input:not([type='range']):not([type='checkbox']),
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  color: var(--ink);
}
textarea {
  min-height: 145px;
  resize: vertical;
}
input[type='range'] {
  width: 100%;
  accent-color: #6f8467;
}
input[type='checkbox'] {
  accent-color: var(--green);
  width: 19px;
  height: 19px;
}
.notice {
  background: #eceee5;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 12px;
  color: #687560;
  margin: 18px 0;
}
.notice.warning {
  background: #f4eadb;
  color: #886c46;
}
.center {
  text-align: center;
}
.narrow {
  max-width: 700px;
  margin: auto;
}
.counter-ring {
  width: 250px;
  height: 250px;
  margin: 32px auto;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #cbd3bf;
  box-shadow:
    0 0 0 15px #e8ecdf80,
    0 0 0 30px #e8ecdf44;
  background: var(--paper);
}
.counter-ring button {
  border: 0;
  background: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: var(--green);
}
.counter-number {
  font:
    62px 'Noto Serif KR',
    serif;
  display: block;
}
.counter-ring small {
  display: block;
  font-size: 11px;
  margin-top: 10px;
}
.beads {
  position: absolute;
  inset: -8px;
  pointer-events: none;
}
.bead {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #c5cbb7;
  border: 2px solid var(--bg);
  border-radius: 50%;
  left: 50%;
  top: 50%;
}
.bead.filled {
  background: #748869;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.metric {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.metric strong {
  font:
    28px 'Noto Serif KR',
    serif;
  display: block;
  margin: 8px 0;
}
.metric small {
  font-size: 11px;
}
.timer-face {
  font:
    68px 'Noto Serif KR',
    serif;
  letter-spacing: 3px;
  margin: 35px 0 7px;
}
.breath {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, #a4b19880, #dfe7d633);
  border: 1px solid #b5c3a5;
  margin: 25px auto;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.breath.running {
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    transform: scale(1.18);
  }
}
.reader {
  font:
    var(--read-size, 21px) / 2.6 'Noto Serif KR',
    serif;
  white-space: pre-wrap;
  padding: 28px 12px;
  color: var(--ink);
}
.reader .verse {
  display: block;
  margin-bottom: 22px;
}
.prose {
  font-size: 14px;
  line-height: 2.1;
}
.prose h3 {
  margin: 25px 0 8px;
}
.course-art {
  height: 140px;
  background: linear-gradient(125deg, #dce4d5, #eee9d9);
  border-radius: 15px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  color: #8d9f7b;
  position: relative;
  overflow: hidden;
}
.course-art .ico {
  width: 50px;
  height: 50px;
  stroke-width: 0.8;
}
.course-art:after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1px solid #879d6b22;
  right: -50px;
  bottom: -80px;
}
.course-card {
  display: block;
  transition: transform 0.2s;
}
.course-card:hover {
  transform: translateY(-3px);
}
.course-card h3 {
  margin: 9px 0;
  font:
    19px 'Noto Serif KR',
    serif;
}
.course-card p {
  min-height: 43px;
}
.lesson-num {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
}
.lesson-num.done {
  background: var(--green);
  color: white;
}
.scene-stage {
  position: relative;
  min-height: 490px;
  border-radius: 25px;
  overflow: hidden;
  background: #dbe4d6;
}
.scene-stage > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene-stage.night {
  filter: brightness(0.65) saturate(0.75);
}
.scene-top {
  position: absolute;
  top: 24px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
}
.scene-bottom {
  position: absolute;
  bottom: 25px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.scene-state {
  position: absolute;
  left: 50%;
  top: 67%;
  transform: translate(-50%, -50%);
  background: #ffffffb3;
  padding: 8px 17px;
  border-radius: 30px;
  font-size: 12px;
}
.scene-stage .btn {
  backdrop-filter: blur(8px);
  background: #fffc;
  border-color: #fff9;
  color: var(--green);
}
.scene-stage .btn.primary {
  background: #334e42e6;
  color: white;
  border-color: #334e42;
}
.swatch {
  height: 115px;
  background: var(--sage);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.swatch > svg {
  width: 100%;
  height: 100%;
}
.selected {
  outline: 2px solid #7a8f69;
  outline-offset: 3px;
}
.settings-list .listrow {
  padding: 19px 0;
}
.settings-list .listrow a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
.empty .ico {
  width: 35px;
  height: 35px;
  margin-bottom: 10px;
}
.catalog {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.catalog th,
.catalog td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}
.screen-catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.screen-link {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 12px 13px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.screen-link span:first-child {
  color: #9b9c89;
  font-size: 10px;
}
.screen-link:hover {
  border-color: #8e9d80;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #17271e66;
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  background: var(--paper);
  border-radius: 24px;
  padding: 30px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.modal h2 {
  margin-bottom: 12px;
}
.modal p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}
.modal .actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.modal .actions > * {
  flex: 1;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 35px;
  transform: translate(-50%, 20px);
  background: #293e34;
  color: white;
  padding: 13px 23px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  font-size: 12px;
  transition: 0.2s;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-nav {
  display: none;
}
.skip {
  position: fixed;
  top: -60px;
  z-index: 300;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 0;
}
.chart {
  height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 15px;
  padding-top: 20px;
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  font-size: 10px;
  color: var(--muted);
}
.chart-col i {
  display: block;
  width: 100%;
  max-width: 35px;
  border-radius: 5px 5px 0 0;
  background: #9bad8d;
  margin-bottom: 8px;
  min-height: 3px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-top: 20px;
}
.calendar > * {
  text-align: center;
  padding: 12px 3px;
  border-radius: 8px;
  font-size: 12px;
}
.calendar button {
  border: 1px solid var(--line);
  background: var(--paper);
}
.calendar .today {
  background: var(--green);
  color: white;
}
.checkboxrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.price {
  font:
    34px 'Noto Serif KR',
    serif;
  margin: 20px 0;
}
.price small {
  font:
    12px 'Noto Sans KR',
    sans-serif;
}
.feature {
  padding: 9px 0;
  font-size: 12px;
}
.feature:before {
  content: '✓';
  color: #7e946e;
  margin-right: 10px;
}
.bottom-note {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 22px;
}
.search {
  position: relative;
  margin-bottom: 23px;
}
.search input {
  padding-left: 40px !important;
}
.search .ico {
  position: absolute;
  left: 13px;
  top: 14px;
  color: var(--muted);
}
.note-card {
  white-space: pre-wrap;
}
.lesson-body {
  font:
    18px/2.3 'Noto Serif KR',
    serif;
  padding: 20px 0;
}
.hide {
  display: none !important;
}
body.dark {
  --bg: #18211e;
  --paper: #222e27;
  --ink: #e9e9dc;
  --muted: #adb5a8;
  --line: #384238;
  --sage: #344235;
  --green: #a2b396;
  --brown: #c1a680;
}
.dark .side {
  background: #1b2620;
}
.dark .btn {
  color: #18211e;
}
.dark .navlink.active {
  background: #334437;
  color: #e4ebd9;
}
.dark .hero {
  color: #263b32;
}
.dark .quote-card {
  background: #29352a;
}
.dark .notice {
  background: #344235;
  color: #d4deca;
}
.dark .topbar {
  background: var(--bg);
}
.dark .chip.active {
  color: #18211e;
}
.dark .scene-stage {
  color: #263b32;
}
.dark .counter-ring button {
  color: var(--ink);
}
.dark .square {
  background: #344235;
}
.large {
  font-size: 17px;
}
.large .main {
  --read-size: 26px;
}
.large p,
.large .btn,
.large .navlink {
  font-size: 16px;
}
.reduced * {
  animation: none !important;
  transition: none !important;
}
@media (min-width: 1500px) {
  .hero {
    min-height: 400px;
  }
  .hero-copy {
    padding: 40px;
  }
  .hero h2 {
    font-size: 36px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 315px;
  }
  .hero-foot {
    left: 40px;
  }
}
@media (max-width: 1180px) {
  .side {
    width: 195px;
    padding: 33px 15px;
  }
  .layout {
    margin-left: 195px;
  }
  .main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
  .hero-copy {
    padding: 28px 25px;
    max-width: 300px;
  }
  .hero h2 {
    font-size: 27px;
  }
  .hero p {
    max-width: 210px;
  }
  .hero {
    min-height: 355px;
  }
  .card {
    padding: 20px;
  }
  .tools {
    gap: 8px;
  }
  .tool small {
    font-size: 9px;
  }
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 950px) {
  .side {
    width: 168px;
  }
  .layout {
    margin-left: 168px;
  }
  .brand {
    margin-left: 8px;
  }
  .brand strong {
    font-size: 24px;
  }
  .brand img {
    width: 29px;
  }
  .navlink {
    padding: 12px 13px;
    font-size: 13px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .rightcol {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .temple-mini {
    display: none;
  }
  .hero {
    min-height: 345px;
  }
  .hero h2 {
    font-size: 32px;
  }
  .hero-copy {
    max-width: 350px;
  }
  .hero p {
    max-width: 280px;
  }
  .grid2 {
    gap: 14px;
  }
  .screen-catalog {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .side {
    display: none;
  }
  .layout {
    margin-left: 0;
  }
  .topbar {
    height: 68px;
    padding: 0 21px;
  }
  .topbar .breadcrumb {
    font:
      600 21px 'Noto Serif KR',
      serif;
    letter-spacing: 2px;
    color: var(--ink);
  }
  .topbar .breadcrumb .ico,
  .topbar .breadcrumb span {
    display: none;
  }
  .top-actions {
    gap: 10px;
  }
  .top-actions .pill {
    font-size: 10px;
  }
  .main {
    padding: 26px 20px 105px;
  }
  .welcome {
    margin-bottom: 23px;
  }
  .welcome h1 {
    font-size: 27px;
  }
  .welcome .date {
    display: none;
  }
  .welcome p {
    font-size: 12px;
    margin-top: 7px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .hero {
    min-height: 360px;
    border-radius: 19px;
  }
  .hero-copy {
    padding: 26px;
    max-width: 290px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero p {
    font-size: 12px;
    max-width: 200px;
  }
  .hero:after {
    background: linear-gradient(90deg, #e4e9def5, #e4e9de80 57%, #e4e9de11);
  }
  .hero-art {
    width: 150%;
    left: -10%;
  }
  .hero-foot {
    left: 26px;
    font-size: 9px;
  }
  .hero-foot > span:first-child {
    max-width: 160px;
  }
  .tools {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .tool {
    padding: 17px 5px;
    min-height: 108px;
    border-radius: 13px;
  }
  .tool strong {
    font-size: 12px;
  }
  .tool small {
    font-size: 9px;
  }
  .section-head {
    margin-top: 25px;
  }
  .section-head h2 {
    font-size: 18px;
  }
  .rightcol {
    grid-template-columns: 1fr;
  }
  .quote-card {
    padding: 20px;
  }
  .quote-card blockquote {
    font-size: 16px;
  }
  .temple-mini {
    display: block;
  }
  .temple-mini .mini-scene {
    height: 135px;
  }
  .footer-line {
    line-height: 1.9;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #fffefaed;
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    display: flex;
    padding: 9px 9px max(9px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobile-nav a {
    font-size: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #90958a;
    min-width: 48px;
    min-height: 45px;
    justify-content: center;
  }
  .mobile-nav a.active {
    color: #334e42;
    font-weight: 600;
  }
  .mobile-nav .ico {
    width: 21px;
    height: 21px;
  }
  .dark .mobile-nav {
    background: #222e27ed;
  }
  .dark .mobile-nav a.active {
    color: #d8e2ca;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head {
    margin-bottom: 23px;
  }
  .page-head p {
    font-size: 12px;
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 14px 10px;
  }
  .metric strong {
    font-size: 24px;
  }
  .metric small {
    font-size: 10px;
  }
  .scene-stage {
    min-height: 520px;
  }
  .scene-stage > svg {
    width: 180%;
    left: -40%;
  }
  .scene-top {
    left: 15px;
    right: 15px;
  }
  .scene-bottom {
    gap: 7px;
  }
  .scene-bottom .btn {
    padding: 10px 14px;
    font-size: 11px;
  }
  .scene-state {
    top: 58%;
  }
  .screen-catalog {
    gap: 7px;
  }
  .screen-link {
    font-size: 11px;
    padding: 11px 9px;
  }
  .card {
    border-radius: 18px;
  }
  .catalog th,
  .catalog td {
    padding: 12px 6px;
    font-size: 10px;
  }
  .counter-ring {
    width: 225px;
    height: 225px;
  }
  .timer-face {
    font-size: 60px;
  }
  .topbar .avatar {
    display: none;
  }
  .modal {
    padding: 24px;
  }
  .reader {
    padding: 20px 0;
  }
  .scene-stage.night + .notice {
    margin-top: 12px;
  }
  #toast {
    bottom: 95px;
  }
  .page-head .btn {
    padding: 10px 13px;
  }
  .continue h3 {
    font-size: 12px;
  }
}
/* Keep Korean phrases intact and reserve room for the hero footer. */
h1,
h2,
h3 {
  word-break: keep-all;
}
.hero-copy {
  max-width: 435px;
  padding-bottom: 76px;
}
.hero h2 {
  font-size: 28px;
}
.hero-foot {
  bottom: 18px;
}
.hero p {
  max-width: 285px;
}
.hero .btn {
  position: relative;
  z-index: 1;
}
@media (max-width: 1180px) {
  .hero-copy {
    max-width: 390px;
  }
  .hero h2 {
    font-size: 26px;
  }
}
@media (max-width: 640px) {
  .hero-copy {
    max-width: 310px;
    padding-bottom: 85px;
  }
  .hero h2 {
    font-size: 25px;
  }
  .hero p {
    max-width: 210px;
  }
  .hero {
    min-height: 375px;
  }
  .hero-foot > span:first-child {
    max-width: 155px;
  }
  .counter-ring .beads {
    display: none;
  }
  .counter-ring {
    box-shadow:
      0 0 0 12px #e8ecdf80,
      0 0 0 24px #e8ecdf44;
  }
}
@media print {
  .side,
  .topbar,
  .mobile-nav,
  .page-head,
  .btn,
  .back {
    display: none !important;
  }
  .layout {
    margin: 0;
  }
  .main {
    padding: 20px;
  }
  .card {
    border: 0;
  }
  .notice,
  .bottom-note {
    display: none;
  }
}
:root {
  --muted: #687268;
}
.navlink {
  color: #697365;
}
.iconbtn {
  width: 44px;
  height: 44px;
}
.chip {
  min-height: 44px;
}
@media (max-width: 640px) {
  .card p {
    font-size: 13px;
  }
  .page-head p {
    font-size: 13px;
  }
  .textbtn {
    min-height: 44px;
  }
  .brand small {
    font-size: 10px;
  }
}
.world-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.world-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.hero-art .world-host {
  inset: 0;
}
.world-stage {
  height: 600px;
  position: relative;
  background: #d9e3dc;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #ced7c9;
  isolation: isolate;
}
.world-stage:fullscreen {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
}
.world-top {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}
.world-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #eef1e9;
  background: #20382bcc;
  border: 1px solid #ffffff2a;
  padding: 12px 15px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}
.world-label small {
  display: block;
  font-size: 9px;
  color: #d2dbcd;
  letter-spacing: 0;
  border-left: 1px solid #aabb9e55;
  padding-left: 10px;
}
.world-options {
  display: flex;
  gap: 7px;
  pointer-events: auto;
}
.world-options button,
.world-options select {
  background: #f9faf0dc;
  border: 1px solid #fff9;
  backdrop-filter: blur(10px);
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 11px;
  color: #334c3d;
}
.world-options select {
  font-size: 11px;
  width: auto;
}
.world-options button.active {
  background: #324d42;
  color: white;
}
.world-caption {
  position: absolute;
  left: 26px;
  bottom: 89px;
  color: white;
  text-shadow: 0 1px 10px #122414;
  pointer-events: none;
}
.world-caption > span {
  display: block;
  font:
    20px 'Noto Serif KR',
    serif;
}
.world-caption small {
  display: block;
  font-size: 10px;
  margin-top: 8px;
  color: #eef2e9;
}
.world-stage:after {
  content: '';
  position: absolute;
  inset: 65% 0 0;
  background: linear-gradient(transparent, #16332577);
  pointer-events: none;
  z-index: -1;
}
.world-stage > .world-host {
  z-index: -2;
}
.world-views {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  display: flex;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 50px);
  padding: 5px;
  background: #f7faeee8;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffffaa;
  border-radius: 14px;
  overflow: auto;
}
.world-views button {
  background: transparent;
  color: #5c705e;
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  white-space: nowrap;
  font-size: 11px;
  min-height: 42px;
}
.world-views button.active {
  background: #334e42;
  color: #fffdf5;
  box-shadow: 0 3px 8px #23372822;
}
.world-loading {
  position: absolute;
  inset: 0;
  background: #e1e8dc;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font:
    16px 'Noto Serif KR',
    serif;
  z-index: 4;
}
.world-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #9cab92;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.world-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #dfe7d9;
  color: #3c5544;
}
.world-fallback button {
  border: 1px solid #718469;
  border-radius: 9px;
  padding: 12px;
  background: #f6f8ef;
}
.world-practice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 24px 0 28px;
}
.world-practice h3 {
  font:
    19px 'Noto Serif KR',
    serif;
  margin: 7px 0;
}
.world-practice p {
  font-size: 12px;
  color: var(--muted);
}
.world-practice .btn {
  white-space: nowrap;
}
.hero:after {
  background: linear-gradient(90deg, #e4e9def2, #e4e9debd 35%, #e4e9de00 80%);
}
.hero-art .world-host canvas {
  pointer-events: none;
}
@media (max-width: 1180px) {
  .world-practice {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .world-stage {
    height: 560px;
  }
  .world-label small {
    display: none;
  }
  .world-views button {
    padding: 10px 13px;
  }
}
@media (max-width: 640px) {
  .world-stage {
    height: 540px;
    border-radius: 18px;
  }
  .world-top {
    left: 13px;
    right: 13px;
    top: 14px;
  }
  .world-label {
    font-size: 8px;
    padding: 11px 10px;
    gap: 5px;
    letter-spacing: 0.5px;
  }
  .world-label .ico {
    width: 16px;
    height: 16px;
  }
  .world-options {
    gap: 5px;
  }
  .world-options select {
    font-size: 10px;
    padding: 6px;
  }
  .world-options button {
    padding: 7px;
    min-width: 36px;
  }
  .world-options .ico {
    width: 17px;
  }
  .world-caption {
    left: 18px;
    bottom: 100px;
  }
  .world-caption > span {
    font-size: 17px;
  }
  .world-views {
    left: 12px;
    right: 12px;
    bottom: 20px;
    max-width: calc(100% - 24px);
  }
  .world-views button {
    padding: 8px 11px;
    font-size: 10px;
  }
  .world-practice {
    padding: 21px 0;
  }
  .world-practice .row {
    width: 100%;
    gap: 7px;
  }
  .world-practice .btn {
    padding: 11px 12px;
    font-size: 11px;
  }
  .hero-art {
    width: 160%;
    left: -25%;
  }
  .world-practice h3 {
    font-size: 17px;
  }
}
/* Devotion v3: selectable fabric seats, articulated practice, sound library. */
#devotion-panel {
  margin: 34px 0 22px;
}
.devotion-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.devotion-heading h2 {
  font-size: 25px;
  margin-top: 8px;
}
.devotion-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.ritual-status {
  font-size: 11px;
  border: 1px solid #d7ddca;
  background: #e9ede2;
  color: #5a6f4d;
  padding: 10px 15px;
  border-radius: 30px;
  white-space: nowrap;
}
.ritual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.seat-card {
  background: linear-gradient(145deg, #fffefa, #f0eee5);
}
.seat-altar {
  font-size: 10px;
  text-align: center;
  letter-spacing: 2px;
  background: #e7e7db;
  padding: 9px;
  color: #7d7d66;
  border-radius: 8px;
  margin-bottom: 14px;
}
.seat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.seat-button {
  position: relative;
  min-width: 0;
  min-height: 53px;
  background: #837669;
  border: 1px solid #756557;
  border-radius: 10px 10px 8px 8px;
  box-shadow:
    inset 0 0 0 4px #ffffff18,
    0 4px 0 #5f554933;
  color: #fff7e4;
  transition: 0.15s;
  padding: 7px;
}
.seat-button:nth-child(3n + 2) {
  background: #738174;
  border-color: #617163;
}
.seat-button:nth-child(3n) {
  background: #a28c6a;
  border-color: #8f7857;
}
.seat-button span {
  font:
    12px 'Noto Serif KR',
    serif;
  position: relative;
  z-index: 1;
}
.seat-button:after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed #e6dcc155;
  border-radius: 6px;
}
.seat-button i {
  display: block;
  width: 4px;
  height: 4px;
  background: #d8c397;
  border-radius: 50%;
  margin: 3px auto 0;
}
.seat-button:hover {
  transform: translateY(-2px);
}
.seat-button.selected {
  outline: 3px solid #d8b46a;
  outline-offset: 3px;
  box-shadow: 0 0 18px #d3af5c44;
}
.ritual-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 17px 0;
}
.ritual-modes button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  min-height: 57px;
  border-radius: 12px;
  font-size: 13px;
}
.ritual-modes button span {
  font:
    15px 'Noto Serif KR',
    serif;
  opacity: 0.65;
}
.ritual-modes button.active {
  background: #334e42;
  color: #f7f3e8;
  border-color: #334e42;
}
.ritual-options {
  display: flex;
  gap: 7px;
  margin-bottom: 17px;
}
.ritual-options .chip {
  padding: 7px 14px;
  min-height: 42px;
}
.ritual-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 7px;
}
.ritual-label small {
  font-size: 10px;
}
.ritual-clock {
  text-align: center;
  padding: 20px 0 22px;
}
.ritual-clock > span {
  display: block;
  font:
    43px 'Noto Serif KR',
    serif;
  letter-spacing: 2px;
}
.ritual-clock small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  min-height: 20px;
}
.ritual-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ritual-actions > * {
  flex: 1;
  white-space: nowrap;
}
.ritual-info {
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
  line-height: 1.9;
}
.ritual-audio-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  background: #e9ece2;
  border: 1px solid #e0e3d6;
  padding: 21px 24px;
  border-radius: 16px;
  gap: 20px;
}
.ritual-audio-callout h3 {
  font-size: 14px;
}
.ritual-audio-callout p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.ritual-audio-callout .btn {
  white-space: nowrap;
}
.chant-mini-row {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.chant-mini-row > span:first-child {
  font-size: 10px;
  color: var(--muted);
}
.chant-mini-row strong {
  font:
    16px 'Noto Serif KR',
    serif;
  margin-right: auto;
}
.chant-mini-row .btn {
  padding: 8px 15px;
  min-height: 40px;
}
.chant-player {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px #303c2908;
}
.chant-cover {
  background: radial-gradient(ellipse at 30% 20%, #80907a, #3e5b4a 70%);
  color: #f1e3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.chant-cover:before,
.chant-cover:after {
  content: '';
  position: absolute;
  border: 1px solid #ead5a72a;
  border-radius: 50%;
  width: 260px;
  height: 260px;
  top: 60px;
  left: -100px;
}
.chant-cover:after {
  width: 320px;
  height: 320px;
  left: 30px;
  top: 230px;
}
.chant-cover > span {
  font:
    39px 'Noto Serif KR',
    serif;
  letter-spacing: 12px;
  writing-mode: vertical-rl;
  line-height: 1.8;
}
.chant-cover small {
  position: absolute;
  bottom: 30px;
  letter-spacing: 1px;
  color: #d0d5bd;
  font-size: 8px;
}
.chant-player-content {
  padding: 28px 30px;
}
.chant-player-content h2 {
  font-size: 29px;
  margin-top: 18px;
}
.chant-player-content > p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 18px;
}
.chant-current {
  font:
    18px/1.9 'Noto Serif KR',
    serif;
  min-height: 75px;
  background: #f2f2e9;
  border-radius: 10px;
  padding: 13px 15px;
  margin-bottom: 18px;
}
.chant-buttons {
  display: flex;
  gap: 9px;
  margin: 20px 0;
}
.chant-buttons > .btn:first-child {
  flex: 1;
}
.chant-adjustments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.chant-adjustments label {
  display: grid;
  align-content: start;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
}
.chant-adjustments select {
  font-size: 11px;
  padding: 8px;
}
.chant-adjustments input[type='range'] {
  margin-top: 13px;
}
.chant-library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.chant-track {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 16px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  min-height: 100px;
}
.chant-track.selected {
  border-color: #83946c;
  box-shadow: inset 0 0 0 1px #83946c;
}
.chant-track-icon {
  width: 40px;
  height: 48px;
  border-radius: 7px;
  background: #e7e9dc;
  display: grid;
  place-items: center;
  font:
    22px 'Noto Serif KR',
    serif;
  color: #7c8468;
  flex-shrink: 0;
}
.chant-track > span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 3px;
}
.chant-track strong {
  font-size: 13px;
}
.chant-track small {
  font-size: 9px;
  color: var(--muted);
}
.chant-track-play {
  color: #788d65;
}
.chant-transcript {
  padding: 18px 0;
}
.chant-transcript p {
  padding: 10px 15px;
  border-radius: 8px;
  font:
    17px/1.8 'Noto Serif KR',
    serif;
  margin: 5px 0;
  color: var(--ink);
}
.chant-transcript p.current {
  background: var(--sage);
}
.audio-dock {
  position: fixed;
  z-index: 70;
  bottom: 18px;
  left: calc(50% + 116px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #243d32ed;
  color: white;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffff20;
  border-radius: 16px;
  box-shadow: 0 8px 30px #13261d33;
  min-width: 310px;
}
.audio-dock a {
  display: grid;
  margin-right: auto;
}
.audio-dock small {
  color: #becdb7;
  font-size: 9px;
}
.audio-dock strong {
  font-size: 12px;
}
.audio-dock button {
  background: #ffffff12;
  border: 1px solid #ffffff30;
  color: #f8f4e9;
  border-radius: 8px;
  font-size: 11px;
  padding: 9px;
}
.world-seat-badge {
  position: absolute;
  right: 25px;
  bottom: 26px;
  background: #244633bd;
  color: #f6edc7;
  border: 1px solid #c9b47955;
  font-size: 11px;
  padding: 12px 15px;
  border-radius: 12px;
}
.dark .seat-card {
  background: var(--paper);
}
.dark .chant-current,
.dark .ritual-modes button {
  background: var(--bg);
}
.dark .ritual-audio-callout {
  background: #2d3d30;
}
.dark .ritual-status {
  background: #344832;
  color: #dce7cb;
}
.dark .seat-altar {
  background: #344235;
  color: #bbc5ab;
}
@media (max-width: 1100px) {
  .ritual-grid {
    grid-template-columns: 1fr;
  }
  .chant-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chant-player {
    grid-template-columns: 170px 1fr;
  }
  .seat-grid {
    max-width: 500px;
    margin: auto;
  }
  .devotion-heading {
    align-items: flex-start;
  }
  .devotion-heading h2 {
    font-size: 22px;
  }
}
@media (max-width: 640px) {
  .world-stage {
    height: 430px;
  }
  .world-views {
    bottom: 16px;
  }
  .world-caption {
    bottom: 90px;
  }
  .world-caption > span {
    font-size: 16px;
  }
  .world-caption small {
    font-size: 9px;
  }
  .world-seat-badge {
    right: 13px;
    bottom: 78px;
    padding: 7px 10px;
    font-size: 9px;
  }
  .devotion-heading {
    flex-direction: column;
    gap: 13px;
  }
  .devotion-heading h2 {
    font-size: 23px;
  }
  .devotion-heading p {
    font-size: 11px;
  }
  .ritual-status {
    padding: 7px 12px;
  }
  .seat-grid {
    gap: 9px;
  }
  .seat-button {
    min-height: 49px;
  }
  .seat-card .row:first-child {
    display: block;
  }
  .seat-card .row:first-child small {
    display: block;
    margin-top: 5px;
  }
  .ritual-modes {
    gap: 7px;
  }
  .ritual-options {
    gap: 6px;
  }
  .ritual-options .chip {
    flex: 1;
    padding: 7px 9px;
  }
  .ritual-audio-callout {
    padding: 19px;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .ritual-clock {
    padding: 18px 0;
  }
  .ritual-clock > span {
    font-size: 41px;
  }
  .chant-player {
    grid-template-columns: 1fr;
  }
  .chant-cover {
    min-height: 145px;
  }
  .chant-cover > span {
    writing-mode: horizontal-tb;
    font-size: 32px;
    letter-spacing: 18px;
  }
  .chant-cover small {
    bottom: 17px;
    font-size: 7px;
  }
  .chant-player-content {
    padding: 22px 18px;
  }
  .chant-player-content h2 {
    font-size: 26px;
  }
  .chant-player-content .row {
    gap: 8px;
  }
  .chant-player-content .row .small {
    font-size: 10px;
  }
  .chant-current {
    font-size: 17px;
  }
  .chant-adjustments {
    grid-template-columns: repeat(2, 1fr);
  }
  .chant-library-grid {
    grid-template-columns: 1fr;
  }
  .chant-track {
    padding: 17px;
  }
  .chant-track small {
    font-size: 10px;
  }
  .chant-track strong {
    font-size: 14px;
  }
  .chant-mini-row {
    gap: 10px;
  }
  .chant-mini-row > span:first-child {
    display: none;
  }
  .chant-mini-row .small {
    width: 100%;
    order: 4;
  }
  .audio-dock {
    left: 12px;
    right: 12px;
    bottom: 83px;
    transform: none;
    min-width: 0;
    padding: 10px 13px;
  }
  .audio-dock small {
    font-size: 8px;
  }
  .audio-dock strong {
    font-size: 11px;
  }
  .ritual-actions .btn {
    padding: 11px 12px;
    font-size: 11px;
  }
}
.recording-credit {
  margin-top: 17px !important;
  font-size: 10px !important;
  line-height: 1.9;
}
.recording-credit a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chant-player input[data-chant-seek] {
  margin: 5px 0 8px;
}

/* ── 메타절 플러스 · 앱 셸 (1.0.0) ── */
.plans {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.plan {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  min-height: 48px;
}
.plan.best {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.plan b {
  font-size: 20px;
  color: var(--green);
}
.plan small {
  color: var(--muted);
}
.plan .tag {
  justify-self: start;
}
.plus-card {
  border-color: #c9b58f;
}
.plus-card .feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plus-card .feature .ico {
  flex: none;
  margin-top: 3px;
}
.plus-card .feature small {
  display: block;
  color: var(--muted);
}
.plus-card .feature:before {
  display: none;
}
.avatar .ico {
  width: 18px;
  height: 18px;
}
body.admin-open {
  overflow: hidden;
}
.dark .plan {
  background: #1f2a25;
  color: #e9ece6;
}
/* 좁은 화면: 조작 안내 한 줄이 '방석 60개' 배지와 겹친다 → 배지가 같은 안내를 하므로 숨긴다 */
@media (max-width: 560px) {
  .world-caption small {
    display: none;
  }
}
/* 좁은 화면: 첫 카드 글이 3D 미리보기(건물) 위에 얹혀 읽기 어렵다 → 글 쪽 그라데이션을 진하게 */
@media (max-width: 640px) {
  .hero:after {
    background: linear-gradient(90deg, #e4e9def5 0%, #e4e9dee6 62%, #e4e9de66 100%);
  }
}

/* ── 법당 전체 화면(1.0.2 · 연화원식): 3D 가 화면 전체, 큰 버튼, 아래 접히는 수행 시트 ── */
body.immersive {
  overflow: hidden;
}
body.immersive .side,
body.immersive .topbar,
body.immersive .mobile-nav,
body.immersive .skip {
  display: none !important;
}
body.immersive .layout {
  margin-left: 0;
}
body.immersive .main {
  padding: 0;
  max-width: none;
  min-height: 0;
}
.immersive {
  --sheet-h: 78px;
}
.immersive-stage {
  position: fixed;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  z-index: 5;
}
.immersive .world-top {
  top: 14px;
  left: 14px;
  right: 14px;
  align-items: center;
}
.ibtn,
.env-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  font-size: 16px;
  backdrop-filter: blur(10px);
}
.ibtn {
  background: #1f332be6;
  color: #f1ead6;
  border: 1px solid #e6d8b966;
  font-weight: 600;
  flex: none;
}
.ibtn .ico {
  width: 20px;
  height: 20px;
}
.env-chip {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 440px;
  margin-right: auto;
  background: #fffef8e8;
  color: #263b32;
  border: 1px solid #d8d2bd;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  line-height: 54px;
  text-align: left;
  cursor: pointer;
}
.immersive .world-options button,
.immersive .world-options select {
  min-height: 54px;
  min-width: 54px;
  border-radius: 18px;
  font-size: 14px;
}
.immersive .world-views {
  bottom: calc(var(--sheet-h) + 14px);
  left: 14px;
  right: auto;
  max-width: calc(100% - 28px);
  overflow-x: auto;
  scrollbar-width: none;
}
.immersive .world-views button {
  min-height: 48px;
  padding: 0 16px;
  font-size: 15px;
  white-space: nowrap;
  flex: none;
}
.immersive .world-seat-badge {
  bottom: calc(var(--sheet-h) + 80px);
  right: 14px;
  font-size: 13px;
  padding: 10px 14px;
}
.ritual-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  max-height: var(--sheet-h);
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 40px #1d2b2433;
  transition: max-height 0.35s ease;
  overflow: hidden;
}
.ritual-sheet.open {
  max-height: min(74vh, 780px);
}
.sheet-handle {
  position: relative;
  flex: none;
  width: 100%;
  min-height: var(--sheet-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
}
.sheet-handle i {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: #c8c3b2;
  transform: translateX(-50%);
}
.sheet-handle small {
  color: var(--muted);
  font-size: 13px;
}
.sheet-body {
  overflow-y: auto;
  padding: 0 18px 28px;
  overscroll-behavior: contain;
}
.sheet-body .ritual-grid {
  grid-template-columns: 1fr;
}
body.immersive .audio-dock {
  bottom: calc(78px + 12px);
  left: 50%;
}
.reduced .ritual-sheet {
  transition: none;
}
/* PC: 시트는 오른쪽 아래 떠 있는 패널 */
@media (min-width: 900px) {
  .immersive {
    --sheet-h: 72px;
  }
  .ritual-sheet {
    left: auto;
    right: 22px;
    bottom: 22px;
    width: 540px;
    border-radius: 24px;
  }
  .ritual-sheet.open {
    max-height: calc(100vh - 120px);
  }
  .immersive .world-views {
    bottom: 22px;
    left: 22px;
    max-width: calc(100% - 600px);
  }
  .immersive .world-seat-badge {
    bottom: 96px;
    right: auto;
    left: 22px;
  }
  body.immersive .audio-dock {
    left: 40%;
  }
}

/* ── 메타버스 조작(1.0.2): 조이스틱 · 앉기 · 첫 방문 안내 · 휴대폰 날씨 칩 둘째 줄 ── */
.joystick {
  position: absolute;
  left: 18px;
  bottom: calc(var(--sheet-h, 78px) + 78px);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle, #1f332b55 0 55%, #1f332b88 56% 100%);
  border: 2px solid #e6d8b9aa;
  touch-action: none;
  z-index: 3;
  display: grid;
  place-items: center;
}
.joystick .knob {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #e0c27c);
  box-shadow: 0 4px 14px #0005;
  pointer-events: none;
  transition: transform 0.08s;
}
.sit-prompt {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sheet-h, 78px) + 150px);
  transform: translateX(-50%);
  z-index: 4;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 20px;
  border: 2px solid #fff7dc;
  background: #e2c37f;
  color: #1f2a20;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 24px #0004;
  cursor: pointer;
}
.sit-prompt[hidden] {
  display: none;
}
.coach {
  position: absolute;
  left: 50%;
  top: 140px;
  transform: translateX(-50%);
  width: min(86%, 460px);
  padding: 14px 18px;
  border-radius: 16px;
  background: #1f332bdd;
  color: #f1ead6;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  z-index: 4;
  animation: coachOut 0.6s 9s forwards;
  pointer-events: none;
}
@keyframes coachOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.immersive .world-views button[data-world-walk] {
  font-weight: 700;
}
@media (max-width: 899px) {
  .immersive .world-top {
    flex-wrap: wrap;
  }
  .immersive .env-chip {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    min-height: 44px;
    line-height: 44px;
    font-size: 13px;
  }
  .immersive .world-options {
    margin-left: auto;
  }
}
@media (min-width: 900px) {
  .joystick {
    bottom: 96px;
    left: 22px;
    width: 120px;
    height: 120px;
  }
  .immersive .world-seat-badge {
    bottom: 232px;
  }
  .sit-prompt {
    bottom: 110px;
    left: calc(50% - 270px);
  }
}

/* ── 1.0.2 단순한 법당: 위 3단추 · 아래 큰 단추 줄 · 작은 창 ── */
.immersive {
  --sheet-h: 96px;
}
.immersive .world-top .top-gap {
  flex: 1;
}
.ibtn.light {
  background: #fffef8e8;
  color: #263b32;
  border: 1px solid #d8d2bd;
}
.ibtn span {
  white-space: nowrap;
}
.env-line {
  pointer-events: auto;
  flex: 1 0 100%;
  order: 9;
  margin-top: 4px;
  padding: 0 4px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 13px;
  text-align: left;
  text-shadow: 0 1px 6px #0009;
  cursor: pointer;
}
.immersive .world-top {
  flex-wrap: wrap;
}
.action-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
  background: #1f332be8;
  border: 1px solid #e6d8b955;
  box-shadow: 0 10px 30px #0005;
  backdrop-filter: blur(10px);
}
.act {
  flex: 1 1 0;
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 18px;
  background: #e2c37f;
  color: #1f2a20;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.act .ico {
  width: 22px;
  height: 22px;
}
.act.more,
.act.ghost {
  flex: 0 0 64px;
  background: #ffffff1f;
  color: #f1ead6;
  font-weight: 500;
  font-size: 12px;
}
.act.ghost {
  flex: 0 0 auto;
  padding: 0 14px;
}
.run-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #f1ead6;
  padding-left: 8px;
}
.run-bar b {
  font-size: 15px;
}
.run-bar span {
  flex: 1;
  font: 600 26px 'Noto Serif KR', serif;
  font-variant-numeric: tabular-nums;
}
.run-bar .act {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 20px;
}
.sit-prompt.wish {
  background: #f3d98f;
}
.sheet-modal {
  width: min(560px, calc(100vw - 24px));
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
}
.sheet-modal .row:first-child {
  align-items: center;
}
.sheet-scroll {
  overflow-y: auto;
  padding-top: 6px;
}
.sheet-modal .sheet-scroll .ritual-grid {
  grid-template-columns: 1fr;
}
.btn.wide {
  width: 100%;
  justify-content: center;
  min-height: 54px;
}
.offering-account {
  display: grid;
  gap: 4px;
  margin: 6px 0 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--sage);
  text-align: center;
}
.offering-account strong {
  font: 600 26px 'Noto Serif KR', serif;
  letter-spacing: 1px;
}
.place-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.place {
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}
.immersive .joystick {
  bottom: calc(var(--sheet-h) + 24px);
}
.immersive .sit-prompt {
  bottom: calc(var(--sheet-h) + 168px); /* 조이스틱(128px) 위 */
  max-width: calc(100% - 40px);
}
@media (min-width: 900px) {
  .action-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 640px;
    bottom: 18px;
  }
  .immersive .joystick {
    bottom: 120px;
  }
  .immersive .sit-prompt {
    bottom: 120px;
    left: 50%;
  }
}

/* 1.0.3 — 3D 안의 메뉴 · 소리 설정 · 명상 음악 */
.menu-list .menu-item { display: flex; align-items: center; gap: 12px; text-align: left; }
.menu-list .menu-item svg { flex: none; width: 22px; height: 22px; }
.menu-list .menu-item span { display: flex; flex-direction: column; }
.menu-list .menu-item small { color: var(--muted, #8a8172); font-size: 12.5px; font-weight: 400; }
.sound-h { margin: 14px 0 8px; font-size: 15px; }
.sound-h small { font-weight: 400; font-size: 12px; }
.chips .chip small { opacity: .7; font-size: 11.5px; }
.music-chips .chip { min-height: 44px; padding: 0 16px; }

/* 공양 창 — 연화원 웹 공양 창과 같은 짜임: 감사 한 줄 · 노란 계좌 카드(복사) · 토스(파랑) · 카카오뱅크(검정 · 노란 글씨) · 쓰임 한 줄 */
.offer-thanks { text-align: center; margin: 2px 0 14px; font-size: 16px; word-break: keep-all; }
.offer-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 22px; background: linear-gradient(135deg, #ffe74a, #f5d400); color: #1d1d1b; }
.offer-card > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.offer-card small { opacity: .75; font-size: 13px; }
.offer-card strong { font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: clamp(18px, 5.6vw, 23px); }
.offer-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 0; background: #1d1d1b14; color: #1d1d1b; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; flex: none; }
.offer-copy svg { width: 18px; height: 18px; }
.offer-send { display: grid; gap: 12px; margin: 12px 0 0; }
.offer-btn { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 20px; border-radius: 22px; border: 0; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.offer-btn span { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.offer-btn.toss { background: #3182f6; color: #fff; }
.offer-btn.kb { background: #2b2b2b; color: #ffe300; border: 1px solid #ffe30066; }
.offer-pc { text-align: center; margin: 12px 0 0; font-size: 13px; opacity: .8; }
.offer-foot { text-align: center; margin: 16px 0 0; font-size: 14px; word-break: keep-all; }


/* ── 1.0.4 명상 호흡 안내 · 사찰 일정 · 함께 걷기 · 연등 · 반야심경 ── */
.breath-guide {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 36px);
  width: 132px;
  height: 132px;
  margin-left: -66px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.breath-guide i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e055 0%, #fff8e022 55%, transparent 70%);
  border: 2px solid #fff3d199;
  animation: breath 10s ease-in-out infinite;
}
.breath-guide b {
  position: absolute;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 1px 8px #000a;
  animation: breath-text 10s linear infinite;
}
.breath-guide b.out {
  animation-name: breath-text-out;
}
@keyframes breath {
  0% { transform: scale(0.55); }
  40% { transform: scale(1); }
  100% { transform: scale(0.55); }
}
@keyframes breath-text {
  0%, 38% { opacity: 1; }
  42%, 96% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes breath-text-out {
  0%, 38% { opacity: 0; }
  42%, 96% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .breath-guide i, .breath-guide b { animation-duration: 20s; }
}
.temple-chip {
  order: 8;
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #b39465e6;
  color: #fff;
  font-weight: 600;
  text-shadow: none;
}
.live-chip {
  order: 8;
  margin: 6px 0 0 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #1f332bcc;
  color: #f6eed6;
  font-size: 12px;
  pointer-events: none;
}
.place.sched.now {
  border-color: var(--gold);
  background: #b394651f;
}
.sutra {
  margin: 10px 0;
  padding-left: 22px;
  line-height: 1.75;
  font-size: 17px;
}
.sutra li {
  padding: 4px 6px;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.6s, color 0.6s;
}
.sutra li.on {
  color: var(--ink);
  background: #b3946526;
  font-weight: 600;
}
.ln-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.lantern-wish {
  font-size: 19px;
  line-height: 1.6;
  font-weight: 600;
}
#lantern-form textarea {
  width: 100%;
  resize: vertical;
}
/* 아래 단추가 6개 — 글자를 한 줄로 */
.action-bar .act span {
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: -0.02em;
}
/* 호흡 안내는 화면 위쪽 가운데(조이스틱·내 캐릭터를 가리지 않게) */
.breath-guide {
  bottom: calc(100% + 58vh - 190px);
}
/* 일정: 한 줄에 하나 · 설명은 아래 줄 */
.sched-list {
  grid-template-columns: 1fr;
}
.place.sched {
  display: block;
  text-align: left;
}
.place.sched small {
  display: block;
  margin-top: 2px;
}

/* ── 1.0.4 법당 화면 재구성(연화원 짜임) — 위: 로고 · 안내 · 장소 · 공양 · 메뉴 / 아래: 큰 단추 넷 / 왼쪽: 밀어서 이동 / 오른쪽: 합장 · 절하기 ── */
.immersive {
  --deep: #10251e;
  --deep2: #13291f;
  --gold-hi: #f1d58e;
  --gold-line: #e9d18d;
  --deep-line: #a8b597;
}
.temple-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(#10251efa, #10251ecc);
  pointer-events: auto;
}
.brand-seal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-line);
  color: var(--gold-hi);
  display: grid;
  place-items: center;
  font: 600 20px 'Noto Serif KR', serif;
}
.brand-name {
  color: #f4efdd;
  font: 500 22px 'Noto Serif KR', serif;
  letter-spacing: 3px;
  white-space: nowrap;
}
.temple-head .top-gap {
  flex: 1;
}
.hbtn {
  min-height: 44px;
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--deep-line);
  background: #162f25f5;
  color: #f4efdd;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.temple-sub {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}
.temple-sub > * {
  pointer-events: auto;
}
.temple-sub .env-line {
  flex: 0 1 auto;
  order: 0;
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: #10251ed0;
  border: 1px solid #b6c49a55;
  text-shadow: none;
  color: #f4efdd;
  font-size: 12px;
}
.temple-chip {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}
.immersive .world-top {
  display: none;
}
/* 아래 큰 단추 넷 */
.immersive .action-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  left: 14px;
  right: 14px;
  border-radius: 18px;
  background: #13291ff2;
  border: 1px solid var(--deep-line);
}
.immersive .action-bar .act {
  min-height: 64px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: #f4efdd;
  border: 0;
  border-radius: 13px;
  font-weight: 600;
}
.immersive .action-bar .act span {
  font-size: 13px;
  white-space: nowrap;
}
.act-ico {
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  color: #edd9a4;
}
.immersive .action-bar .act.primary {
  background: var(--gold-hi);
  color: #14251e;
}
.immersive .action-bar .act.primary .act-ico {
  color: #173326;
}
.immersive .action-bar .run-bar {
  grid-column: 1 / -1;
}
/* 밀어서 이동 */
.immersive .joystick {
  width: 128px;
  height: 128px;
  left: 14px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  border: 2px solid var(--gold-line);
  background: radial-gradient(circle, #6a7c4cbd, #112a20f5);
  box-shadow: 0 5px 18px #0006;
}
.immersive .joystick .knob {
  width: 52px;
  height: 52px;
  background: radial-gradient(circle at 30% 25%, #fff1b0, #c5ad65);
}
.joy-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  text-align: center;
  font-size: 12px;
  color: #fff4cf;
  pointer-events: none;
}
/* 오른쪽 손동작 */
.gesture-col {
  position: absolute;
  right: 14px;
  bottom: calc(100px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gbtn {
  min-width: 84px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 13px;
  border: 1px solid var(--deep-line);
  background: #13291ff2;
  color: #f4efdd;
  font-size: 14px;
  font-weight: 600;
}
.immersive .coach {
  top: calc(108px + env(safe-area-inset-top));
  background: #10251ee8;
  color: #f4efdd;
  border: 1px solid #b6c49a66;
}
.guide-steps {
  padding-left: 20px;
  line-height: 1.7;
}
.guide-steps li {
  padding: 3px 0;
}
@media (min-width: 900px) {
  .immersive .action-bar {
    left: 50%;
    right: auto;
    width: 620px;
    margin-left: -310px;
  }
}
/* 수행 중 줄: 단추는 단추답게 */
.immersive .action-bar .run-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f4efdd;
  padding: 4px 6px;
}
.immersive .action-bar .run-bar .act {
  min-height: 46px;
  flex-direction: row;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--gold-hi);
  color: #14251e;
}
.immersive .action-bar .run-bar .act.ghost {
  background: transparent;
  color: #f4efdd;
  border: 1px solid var(--deep-line);
}
.breath-guide {
  bottom: calc(100% + 66vh - 190px);
}

/* ── 오프닝 ── */
.opening {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: radial-gradient(ellipse at 50% 40%, #1c3a2e, #0b1a14 75%);
  color: #f4efdd;
  transition: opacity 0.7s ease;
}
.opening img {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 10px 34px #0008;
  margin-bottom: 14px;
}
.opening b {
  font: 500 34px 'Noto Serif KR', serif;
  letter-spacing: 6px;
}
.opening small {
  font-size: 11px;
  letter-spacing: 5px;
  color: #c9d2c2;
}
.opening p {
  margin-top: 14px;
  font-size: 14px;
  color: #e1e7d7;
}
.opening.out {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .opening { transition: none; }
}

/* ── 화면 창: 3D 위에서 다른 화면을 연다(웹 페이지로 나가지 않음) ── */
.page-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}
.page-sheet-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: #10251e;
  color: #f4efdd;
}
.page-sheet-bar b {
  font-size: 16px;
}
.page-sheet-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
}
.page-sheet-body .page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}
/* 소원등 색: 한 줄 6개 */
.ln-colors {
  flex-wrap: nowrap;
  gap: 6px;
}
.ln-colors .chip {
  min-width: 0;
  flex: 1;
  padding: 8px 0;
  justify-content: center;
}
#lantern-form .field {
  margin-bottom: 8px;
}
/* ⚠ display:flex 가 hidden 속성을 이겨, 닫은 화면 창이 빈 화면으로 3D 를 덮고 있었다 */
.page-sheet[hidden] {
  display: none;
}
/* 서버 단추(왼쪽 위) · 서버 목록 */
.server-chip {
  order: -1;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--gold-line, #e9d18d);
  background: #13291ff2;
  color: #fff4cf;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.server-row {
  display: block;
  width: 100%;
  text-align: left;
}
.server-row.now {
  border-color: var(--gold);
  background: #b394651f;
}
.server-row[disabled] {
  opacity: 0.85;
  cursor: default;
}
.lv {
  font-style: normal;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 4px;
}
.lv.ok { color: #2f6b3f; background: #d9ecd9; }
.lv.mid { color: #7a5a12; background: #f3e6c2; }
.lv.busy { color: #8a3c12; background: #f6d6c3; }
.lv.full { color: #fff; background: #a23a2a; }

/* ── 내공·공양 코인 · 소원당(merit.js) ── */
.pouch { display: flex; gap: 10px; margin: 0 0 12px; }
.pouch span { flex: 1; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #1d3a2f, #10251e); color: #f6ecd9; font-size: 13px; }
.pouch b { color: #f1d58e; font-size: 17px; margin-left: 4px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tools span { padding: 3px 9px; border-radius: 999px; font-size: 12px; }
.tools .ok { background: #e7f0e2; color: #2f5a3b; }
.tools .miss { background: #f6e3df; color: #9a3b2c; }
.shop-row small { display: flex; align-items: center; gap: 10px; }
.shop-row .textbtn[disabled] { opacity: 0.4; }
.wish-paper, .wish-card { display: grid; gap: 6px; padding: 16px 18px; margin: 10px 0; border-radius: 16px; text-align: center; }
.wish-paper { background: #fbf6e8; border: 1px dashed #c9b17a; color: #4a3a26; }
.wish-paper b, .wish-card b { font-size: 17px; line-height: 1.5; word-break: keep-all; }
.wish-card { background: linear-gradient(160deg, #3d2a1f, #10251e); border: 1px solid #f1d58e; color: #f6ecd9; box-shadow: 0 0 24px #f1d58e33; }
.wish-card b { color: #f1d58e; }
.light-fx { text-align: center; font-weight: 600; }
.light-fx::before { content: '🔥'; display: block; font-size: 44px; animation: flame-up 1.6s ease-out both; }
@keyframes flame-up { 0% { opacity: 0; transform: scale(0.3) translateY(10px); } 40% { opacity: 1; transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .light-fx::before { animation: none; } }
.place.shop-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; min-height: 0; }
.place.shop-row b small { margin-left: 6px; font-weight: 400; }
.place.shop-row > small { margin: 0; white-space: nowrap; }

/* ── 글자 줄바꿈: 한국어는 어절(띄어쓰기) 단위로 — '승 ⏎ 시'처럼 음절 사이에서 끊기지 않게.
      너무 긴 낱말(주소·영문)만 어쩔 수 없을 때 끊는다 ── */
html { word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, button, .place b { text-wrap: balance; }
p, small, li { text-wrap: pretty; }
/* 가운데 띄운 단추(앉기·소원·공양간): left:50% 라 폭이 화면 절반으로 줄어 접혔다 → 글자 폭만큼 */
.sit-prompt { width: max-content; max-width: calc(100% - 32px); line-height: 1.3; }
/* 좁은 화면 메뉴: 두 칸이면 제목이 접힌다 → 한 줄 목록 */
@media (max-width: 430px) {
  .menu-list { grid-template-columns: 1fr; }
  .menu-list .menu-item { min-height: 56px; }
}

/* 유료 금빛 소원등 · 큰 소원초 — 무료와 한눈에 구분되게 금빛 */
.paid-box { margin: 10px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #f1d58e; background: linear-gradient(160deg, #3d2a1f, #1a2f24); color: #f6ecd9; box-shadow: 0 0 20px #f1d58e2e; }
.paid-box b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.paid-box ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.chip.gold { border-color: #d4a73c; color: #8a6210; font-weight: 700; }
.chip.gold.active { background: linear-gradient(135deg, #f7dc8f, #d9a441); color: #2a1d10; }
.btn.gold { background: linear-gradient(135deg, #f7dc8f, #d9a441); color: #2a1d10; border-color: #f1d58e; }
.wish-card.gold { box-shadow: 0 0 34px #f1d58e66; border-width: 2px; }
.paid-box .muted { color: #e6d6b0; }

/* 메뉴 묶음 제목 · 이달의 연못 */
.menu-h { margin: 14px 2px 6px; font-size: 13px; letter-spacing: .04em; color: var(--muted, #8a8172); font-weight: 700; }
.menu-h:first-of-type { margin-top: 10px; }
.pond-row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid #f1d58e; background: linear-gradient(135deg, #fff8e6, #f6ecd2); }
.pond-row span:last-child { display: flex; flex-direction: column; }
.pond-row small { color: var(--muted, #8a8172); font-size: 12.5px; font-weight: 400; }
.pond-mini { flex: none; min-width: 34px; font-size: 15px; letter-spacing: -3px; }
.pond-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; text-align: center; }
.pond-grid b { font-size: 11.5px; color: var(--muted, #8a8172); }
.pond-grid i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #e3efe9; font-size: 18px; }
.pond-grid i:empty { background: none; }
.pond-grid i small { font-size: 11px; color: #6c8b7d; }
.pond-grid i.on { background: #fde9ef; }
.pond-grid i.later { background: #f2f4f2; }
.pond-grid i.today { outline: 2px solid #d4a73c; }

/* 🌙 잠들기 — 화면 전체를 거의 검게(밝기도 최저로 내린다) · 달과 숨 안내만 아주 어둡게 */
body.sleeping { background: #000; }
body.sleeping canvas { visibility: hidden; } /* 잠든 동안 3D 를 그리지도 합성하지도 않는다 */
.sleep-screen { position: fixed; inset: 0; z-index: 9999; background: #000; color: #5e5a52; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.sleep-moon { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #3b3832, #1c1b18 70%); box-shadow: 0 0 40px #2a281f; }
.sleep-screen.sleep-breathing .sleep-moon { animation: sleep-breath 10s ease-in-out infinite; }
@keyframes sleep-breath { 0% { transform: scale(.82); } 40% { transform: scale(1.08); } 100% { transform: scale(.82); } }
.sleep-breath { font-size: 18px; min-height: 1.5em; color: #6e695f; }
.sleep-left { font-size: 13px; color: #45423c; }
.sleep-wake { margin-top: 30px; background: none; border: 1px solid #2e2c27; color: #5e5a52; border-radius: 999px; padding: 10px 26px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .sleep-screen.sleep-breathing .sleep-moon { animation: none; } }

/* ── 오늘의 수행 — 홈 카드 · 진행 자막 카드(법당 위에 떠 있음) ── */
.daily-card { margin-bottom: 20px; }
.daily-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.daily-title { font-size: 22px; margin: 8px 0 6px; }
.daily-teach { margin: 0 0 12px; word-break: keep-all; }
.daily-done { margin: 0 0 10px; font-size: 14px; color: #2f5d4a; }
.daily-go { display: grid; gap: 10px; margin: 14px 0 10px; }
.daily-recent summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.daily-player { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px)); max-height: 60vh; overflow: auto; padding: 16px 18px; border-radius: 22px; background: rgba(23, 60, 50, .97); color: #f7f4ec; box-shadow: 0 12px 40px #0006; }
.daily-player .dp-top { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: end; }
.daily-player .dp-top small { grid-column: 1 / -1; opacity: .8; }
.daily-player .dp-step { font-size: 20px; }
.daily-player .dp-left { font-variant-numeric: tabular-nums; opacity: .9; }
.daily-player .bar { margin: 10px 0; background: #ffffff22; }
.daily-player .bar span { background: #d8b56b; transition: width .5s linear; }
.daily-player .dp-text { font-size: 18px; line-height: 1.7; margin: 0 0 12px; word-break: keep-all; }
.daily-player .row { display: flex; gap: 10px; }
.daily-player .btn { flex: 1; min-height: 52px; justify-content: center; }
.daily-player .btn.ghost { color: #f7f4ec; border-color: #f7f4ec66; }
body:has(.immersive) .daily-player { bottom: calc(110px + env(safe-area-inset-bottom)); }
body.daily-on .joystick, body.daily-on .gesture-col, body.daily-on .sit-prompt { display: none !important; }

/* ── 오늘의 말씀 — 홈 카드 · 읽기 창 ── */
.dharma-card { margin-bottom: 20px; }
.dharma-title { font-size: 21px; margin: 6px 0 8px; }
.dharma-quote { font: 600 19px 'Noto Serif KR', serif; line-height: 1.7; margin: 6px 0 2px; word-break: keep-all; }
.dharma-hanja { font: 500 22px 'Noto Serif KR', serif; letter-spacing: .08em; margin: 0; }
.dharma-preview { margin: 12px 0; word-break: keep-all; }
.dharma-src { padding: 14px 16px; border-radius: 16px; background: var(--sage, #e8efe9); margin: 8px 0 14px; }
.dharma-src small { display: block; margin-top: 6px; opacity: .8; }
.dharma-box { padding: 14px 16px; border-radius: 16px; border: 1px dashed #c9b98f; margin-bottom: 12px; }
.dharma-box p { margin: 8px 0 0; line-height: 1.75; word-break: keep-all; }
.dharma-tts { margin: 16px 0 10px; padding-top: 12px; border-top: 1px solid #0001; }
.dharma-now { min-height: 1.5em; font-size: 15px; color: #2f5d4a; word-break: keep-all; }
