.od-body {
  margin: 0;
  background: #f7f4e9;
}

[data-math-odyssey] {
  --paper: #f7f4e9;
  --sheet: #fffcf4;
  --forest: #31534a;
  --ink: #242f29;
  --muted: #4d5c52;
  --line: #c7c9b3;
  --clay-ink: #8c4434;
  box-sizing: border-box;
  max-width: 73rem;
  margin-inline: auto;
  padding: clamp(1rem, 4vw, 3rem);
  color: var(--ink);
  font: 1rem/1.6 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
[data-math-odyssey] *, [data-math-odyssey] *::before, [data-math-odyssey] *::after { box-sizing: border-box; }
[data-math-odyssey] :where(h1, h2, h3, h4, p, ul) { margin: 0; }
[data-math-odyssey] :where(h1, h2, h3) { font-family: "Noto Serif CJK SC", "Songti SC", SimSun, Georgia, serif; }
[data-math-odyssey] button {
  min-height: 44px;
  color: var(--forest);
  border: 1px solid #78887b;
  border-radius: .35rem;
  background: var(--sheet);
  padding: .5rem .85rem;
  font: inherit;
  cursor: pointer;
}
[data-math-odyssey] button:hover:not(:disabled) { background: #e9eddf; }
[data-math-odyssey] button[aria-pressed="true"] { background: #e1e9da; border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
[data-math-odyssey] button:disabled { opacity: .54; cursor: default; }
[data-math-odyssey] :focus-visible { outline: 3px solid #9a5135; outline-offset: 3px; }
[data-math-odyssey] .od-primary { background: var(--forest); border-color: var(--forest); color: #fffdf4; }
[data-math-odyssey] .od-primary:hover { background: #243f38; }

.od-masthead { border-block: 1px solid var(--line); padding: 1.3rem 0 1.45rem; text-align: center; }
.od-masthead h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); line-height: 1.25; letter-spacing: .09em; }
.od-imprint { font: 700 .85rem/1.4 Georgia, serif; color: var(--forest); letter-spacing: .26em; margin-bottom: .55rem; }
.od-subtitle { color: var(--muted); letter-spacing: .1em; margin-top: .45rem; }
.od-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.od-nav button { border-color: transparent; background: transparent; }
.od-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .6rem 1rem; padding-top: clamp(1.2rem, 4vw, 2.35rem); }
.od-intro h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); line-height: 1.25; }
.od-place { color: var(--clay-ink); font-size: .9rem; font-weight: 700; letter-spacing: .08em; margin-bottom: .3rem; }
.od-question { color: var(--muted); margin-top: .4rem; }
.od-tools { display: flex; gap: .45rem; }
.od-tools button { background: transparent; }
.od-chapter > .od-workspace { margin-top: .9rem; }
.od-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.od-room .od-feedback, .od-ledger .od-feedback, .od-feedback { margin: .6rem 0 0; color: var(--clay-ink); font-weight: 600; }
.od-workspace { margin-bottom: 1rem; }
.od-spread { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(.85rem, 2.7vw, 1.75rem); align-items: start; }
.od-room, .od-ledger, .od-note {
  border: 1px solid var(--line);
  border-radius: .7rem;
  padding: clamp(.8rem, 2.4vw, 1.65rem);
  background: var(--sheet);
}
.od-room { background: #eeefdf; }
.od-room-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; }
.od-thread { color: var(--clay-ink); font-size: 1.45rem; }
.od-rail { display: grid; gap: .7rem; margin: .75rem 0 1.15rem; }
.od-choices { min-width: 0; padding: 0; margin: 0; border: 0; }
.od-choices legend { color: var(--muted); font-weight: 600; margin-bottom: .3rem; }
.od-choices div { display: flex; flex-wrap: wrap; gap: .4rem; }
[data-math-odyssey] .od-swatch { display: grid; justify-items: center; gap: .15rem; min-width: 4.5rem; padding: .45rem .28rem; font-size: .875rem; }
[data-math-odyssey] .garment { display: block; width: 2.7rem; height: 2.2rem; background: var(--fabric, #cdd5c5); }
[data-math-odyssey] .garment.shirt { clip-path: polygon(22% 4%, 39% 0%, 44% 13%, 56% 13%, 61% 0%, 78% 4%, 100% 32%, 84% 54%, 73% 44%, 73% 100%, 27% 100%, 27% 44%, 16% 54%, 0 32%); }
[data-math-odyssey] .garment.trousers { width: 2.05rem; height: 2.55rem; clip-path: polygon(16% 0, 84% 0, 98% 99%, 60% 99%, 50% 43%, 40% 99%, 2% 99%); }
[data-math-odyssey] .garment.clay { background: repeating-linear-gradient(0deg,#944833 0 6px,#a95a42 6px 8px); }
[data-math-odyssey] .garment.fern { background: #638160; }
[data-math-odyssey] .garment.lake { background: repeating-linear-gradient(135deg,#456b80 0 8px,#5e8295 8px 10px); }
[data-math-odyssey] .garment.ink { background: #35465b; }
[data-math-odyssey] .garment.oat { background: #b38d55; }
.od-fitting { display: grid; grid-template-columns: 5.3rem minmax(0, 1fr); gap: .9rem; align-items: center; border-top: 1px dashed #a2ab96; padding-top: .9rem; }
.od-fitting-art { display: grid; gap: .2rem; justify-items: center; padding: .6rem .35rem; border: 1px dashed #879883; border-radius: .3rem; background: #f7f6e9; }
.od-fitting-art .shirt { width: 3.45rem; height: 2.8rem; }
.od-fitting-art .trousers { width: 2.65rem; height: 3.25rem; }
.od-fitting-text p { margin: .15rem 0 .55rem; color: var(--muted); }
.od-ledger { border-top: .25rem solid #73836e; }
.od-ledger > p { margin: .35rem 0 .7rem; color: var(--muted); }
.od-ledger .od-empty { border: 1px dashed var(--line); padding: .7rem; margin: .7rem 0; }
.od-cards { display: flex; flex-wrap: wrap; gap: .32rem; }
.od-ledger > .od-cards { margin-bottom: .75rem; }
[data-math-odyssey] .od-mini { display: grid; align-content: center; justify-items: center; gap: .1rem; min-width: 2.8rem; min-height: 3.4rem; padding: .22rem; border: 1px solid #b6bea9; border-radius: .28rem; }
.od-mini .shirt { width: 1.65rem; height: 1.35rem; }
.od-mini .trousers { width: 1.18rem; height: 1.45rem; }
.od-groups { border-top: 1px solid var(--line); }
.od-group { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-height: 4rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.od-group > :first-child { min-width: 6.3rem; }
.od-group > b { color: var(--forest); }
.od-note { margin-top: 1rem; border-left: .25rem solid #71836b; }
.od-note p { margin: .45rem 0; }
.od-note details { margin: .6rem 0; }
.od-note summary { cursor: pointer; width: fit-content; color: var(--forest); padding-block: .55rem; }
.od-note .od-equation { font-size: clamp(1.05rem, 3vw, 1.35rem); font-weight: 700; color: var(--forest); }
.od-transfer strong { margin-right: .4em; }
.od-flock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .24rem; text-align: center; margin: 1.25rem 0; }
[data-math-odyssey] .od-animal { display: grid; place-content: center; justify-items: center; min-height: 3rem; padding: .1rem; }
.od-flock-spot { display: grid; justify-items: center; gap: .28rem; }
.od-spread-flock { padding-block: .7rem; }
.od-spread-flock .od-flock-spot:nth-child(even) { margin-top: 1.35rem; }
[data-math-odyssey] .sheep-art { display: block; position: relative; margin: .2rem .22rem; width: 1.8rem; height: 1.25rem; border-radius: 45%; background: #fffdf1; box-shadow: 0 0 0 1px #6e7763; }
[data-math-odyssey] .sheep-art::before { content: ""; position: absolute; right: -.27rem; top: .22rem; width: .58rem; height: .64rem; border-radius: 45%; background: #505747; }
[data-math-odyssey] .sheep-art::after { content: ""; position: absolute; bottom: -.3rem; left: .35rem; width: .15rem; height: .34rem; background: #505747; box-shadow: .65rem 0 #505747; }
.od-stone-slot, .od-vacancy { display: block; width: 1.3rem; height: 1rem; border: 1px dashed #84917c; border-radius: .5rem; }
[data-math-odyssey] .stone-art { display: block; width: 1.05rem; height: .7rem; border-radius: 68% 60% 45% 42%; background: #6c756c; }
[data-math-odyssey] .od-stone { display: grid; place-content: center; min-width: 44px; padding: .2rem; }
.od-meadow p { margin: .65rem 0; }
.od-pairs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .7rem 0; }
.od-pairs li { padding: .35rem .55rem; border: 1px solid var(--line); border-radius: .3rem; }
.od-pans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: .7rem 0 0; }
.od-pans section { display: flex; flex-direction: column; justify-content: end; min-width: 0; }
.od-pans section > div { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; border-bottom: .22rem solid #536a57; padding: .4rem 0; }
[data-math-odyssey] .od-apple { display: grid; place-content: center; min-width: 44px; min-height: 44px; padding: .15rem; }
[data-math-odyssey] .apple-art { position: relative; display: block; width: 1.05rem; height: .98rem; border-radius: 42% 45% 48% 46%; background: #9a4f3c; }
[data-math-odyssey] .apple-art::after { content: ""; position: absolute; top: -.28rem; left: .49rem; width: .45rem; height: .28rem; border-radius: 75% 0; background: #45664d; }
.od-box { display: grid; place-content: center; min-width: 2.8rem; min-height: 2.7rem; border: 2px solid #826138; border-radius: .25rem; background: #e9c895; font-size: 1.25rem; }
.od-beam { position: relative; margin: .5rem auto 1rem; width: 83%; height: .17rem; background: #536a57; }
.od-beam::after { content: ""; position: absolute; top: .17rem; left: calc(50% - .55rem); border: .55rem solid transparent; border-top: 0; border-bottom-color: #536a57; }
.od-balance > p { margin: 1.4rem 0 .6rem; }

@media (max-width: 690px) {
  .od-spread { grid-template-columns: minmax(0, 1fr); }
  .od-masthead { padding-block: .85rem; }
  .od-nav button { padding-inline: .55rem; }
}
