.fp-room {
  --fp-ink: #173f32;
  --fp-body: #425747;
  --fp-gold: #8a6936;
  --fp-rule: #cfc8b6;
  --fp-paper: #f7f4e9;
  color: var(--fp-ink);
  container-type: inline-size;
  font-family: inherit;
  line-height: 1.45;
}
.fp-room *, .fp-room *::before, .fp-room *::after { box-sizing: border-box; }
.fp-room [hidden] { display: none !important; }
.fp-room .fp-intro, .fp-room .fp-reading, .fp-room .fp-method p {
  color: var(--fp-body);
  font-size: .94rem;
  margin: 0 0 1.05rem;
}
.fp-room button, .fp-room select, .fp-room input { font: inherit; }
.fp-room button, .fp-room summary, .fp-room input[type=range] { cursor: pointer; }
.fp-room :is(button, input, select, summary):focus-visible { outline: 2px solid #966323; outline-offset: 3px; }
.fp-modes { display: flex; width: fit-content; border: 1px solid var(--fp-rule); border-radius: 5px; overflow: visible; margin: 1rem 0 1.2rem; }
.fp-modes button {
  border: 0; color: var(--fp-ink); background: transparent; padding: .6rem .9rem;
  min-height: 44px; font-size: .9rem; line-height: 1.2; letter-spacing: 0;
}
.fp-modes button:first-child { border-radius: 4px 0 0 4px; }
.fp-modes button:last-child { border-radius: 0 4px 4px 0; }
.fp-modes button[aria-pressed=true], .fp-submit button { color: #fff9e7; background: var(--fp-ink); }
.fp-sampler { padding: 1rem; border: 1px solid var(--fp-rule); border-radius: 4px; background: var(--fp-paper); }
.fp-line, .fp-scale, .fp-submit { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.fp-line label, .fp-personal label { color: var(--fp-ink); font-weight: 600; font-size: .88rem; }
.fp-line output { font-variant-numeric: tabular-nums; color: var(--fp-gold); font-weight: 650; }
.fp-slider { accent-color: var(--fp-ink); width: 100%; min-height: 2.5rem; padding: 0; margin: 0; display: block; }
.fp-scale, .fp-submit small { color: var(--fp-body); font-size: .78rem; }
.fp-room .fp-guide-note { margin: .65rem 0 0; font-size: .85rem; color: var(--fp-body); }
.fp-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.fp-personal label { display: block; margin-bottom: .75rem; }
.fp-personal :is(input, select) {
  display: block; min-height: 44px; min-width: 0; width: 100%; margin-top: .25rem; padding: .5rem .65rem;
  border: 1px solid #9da79a; border-radius: 4px; color: var(--fp-ink); background: #fffdf7;
  font-size: 1rem; font-weight: 400; color-scheme: light;
}
.fp-submit { flex-wrap: wrap; justify-content: flex-start; gap: .75rem; }
.fp-submit button { min-height: 44px; border: 0; padding: .55rem 1rem; border-radius: 4px; font-weight: 600; }
.fp-error { color: #863c2a; margin: .75rem 0 0; }
.fp-dateline { margin: 1.2rem 0 .55rem; font-size: .8rem; color: var(--fp-body); font-variant-numeric: tabular-nums; }
.fp-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(3px,1.5cqi,8px); }
.fp-card {
  min-width: 0; display: flex; flex-direction: column; gap: .2rem; align-items: center;
  justify-content: flex-start; text-align: center; border: 1px solid var(--fp-rule); border-top: 2px solid #a79a79;
  padding: .55rem .12rem .65rem; background: var(--fp-paper); border-radius: 3px;
}
.fp-card.fp-current { border-color: #abab8b; border-top-color: #87662c; background: #eee9d6; }
.fp-period { font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--fp-body); }
.fp-han { color: var(--fp-ink); font-family: "Songti SC","Noto Serif CJK SC","SimSun",serif; font-size: clamp(1.35rem,7cqi,2rem); line-height: 1.35; }
.fp-pinyin { font-size: clamp(.72rem,2.8cqi,.88rem); font-style: italic; }
.fp-symbol, .fp-boundary { color: var(--fp-body); font-size: clamp(.66rem,2.6cqi,.79rem); line-height: 1.25; }
.fp-boundary { margin: auto 0; padding: .35rem; }
.fp-room .fp-reading { margin: .7rem 0 1.2rem; line-height: 1.5; }
.fp-method { margin-top: 1rem; border-top: 1px solid var(--fp-rule); }
.fp-method summary { display: list-item; min-height: 44px; padding: .7rem 0 .5rem; font-size: .88rem; font-weight: 600; }
.fp-room .fp-method p { font-size: .84rem; margin-bottom: 0; }
@container (max-width: 274px) {
  .fp-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fp-fields { grid-template-columns: minmax(0,1fr); gap: 0; }
  .fp-modes button { padding-inline: .55rem; }
}
