/* 推し活の記録帳（cases/oshi.json "theme": "oshi"）。見本と決めた理由は design/oshi/（brief.md・decision.md・rounds.md）。
   地は生成りの紙と墨の文字。色は推しの色：--c（推しごと）と --accent（頁の差し色＝1人目の推しの色）を app.js が入れる。
   推しの色そのものは文字を載せない所（テープ・印・縁）だけ。ボタンと色の付いた文字は、紙との比が4.6以上になるまで暗くした
   --c-deep・--accent-deep（app.js が計算）。スマホ（375px）を先に作り、面の切り替えは画面の下（親指で届く所）に置く。 */

.theme-oshi {
  --paper: #faf6ef;
  --ink: #2b2522;
  --sub: #6b5f57;
  --line: #e4dacb;
  --rule: #cfc3b2;
  --accent: #e4508a;
  --accent-deep: #b6406e;
  --round: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(43, 37, 34, 0.05) 1px, transparent 1.3px);
  background-size: 24px 24px;
  color: var(--ink);
  line-height: 1.7;
}
.theme-oshi a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.theme-oshi footer a {
  color: #fff;
}
/* The rounded face (Hiragino Maru Gothic, one weight) only for the title and big numbers; the
   section and form headings stay in the bold gothic. */
.theme-oshi h1 {
  font-family: var(--round);
  letter-spacing: 0.02em;
}
.theme-oshi h2 {
  color: var(--ink);
  border-left: 0;
  padding-left: 0;
  font-size: 1.15rem;
}
.theme-oshi h3 {
  font-size: 0.95rem;
  color: var(--sub);
  margin: 1.4em 0 0.5em;
}

/* the top bar: one quiet line */
.theme-oshi .topbar {
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.theme-oshi .topbar .wrap {
  min-height: 44px;
}
.theme-oshi .topbar a.brand,
.theme-oshi .topbar a {
  color: inherit;
}
.theme-oshi .topbar .brand {
  font-size: 0.92rem;
}
.theme-oshi .brand-sub {
  color: var(--sub);
  font-size: 0.75rem;
}

/* the title: no band, no gradient. A strip of tape in the accent color, the name, one line. */
.theme-oshi .tool-hero {
  background: transparent;
  color: var(--ink);
  padding: 0;
}
.theme-oshi .tool-hero .eyebrow {
  display: inline-block;
  position: relative;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 1px 10px;
  margin: 14px 0 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
}
.theme-oshi .tool-hero .eyebrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.2;
  z-index: -1;
}
.theme-oshi .tool-hero .eyebrow {
  z-index: 0;
}
.theme-oshi .tool-hero h1 {
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 0 0 0.15em;
}
.tool-headline {
  font-size: 0.88rem;
  font-weight: 400;
  margin: 0 0 0.6em;
  color: var(--ink);
}
.theme-oshi .tool-hero .lead {
  font-size: 0.9rem;
  color: var(--ink);
  max-width: none;
}
.theme-oshi .tool-hero .points {
  font-size: 0.85rem;
  color: var(--sub);
  list-style: none;
  padding: 0;
  margin: 0;
}
.theme-oshi .tool-hero .points li {
  position: relative;
  padding-left: 1.1em;
}
.theme-oshi .tool-hero .points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--sub);
}

/* buttons */
.theme-oshi .btn {
  background: var(--accent-deep);
  color: #fff;
  border-radius: 12px;
  min-height: 48px;
  padding: 0.7em 1.4em;
  font-size: 1rem;
}
.theme-oshi .btn:hover,
.theme-oshi .btn:focus {
  background: var(--ink);
}
.theme-oshi .btn:focus-visible,
.theme-oshi button:focus-visible,
.theme-oshi a:focus-visible,
.theme-oshi input:focus-visible,
.theme-oshi select:focus-visible,
.theme-oshi textarea:focus-visible,
.theme-oshi summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.btn-plain,
.btn-danger,
.chip,
.seg {
  font: inherit;
  font-size: 0.88rem;
  border-radius: 999px;
  padding: 0.3em 1em;
  min-height: 44px;
  cursor: pointer;
  line-height: 1.4;
}
.btn-plain {
  background: #fff;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn-plain.danger {
  color: #a3271c;
  border-color: #e3c0b8;
}
.btn-danger {
  background: #fff;
  border: 1px solid #a3271c;
  color: #a3271c;
  font-weight: 700;
}
.form-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* the panels and the tabs */
.tool {
  padding-bottom: 24px;
}
.panel {
  padding: 8px 0 8px;
}
.panel > .wrap > h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sub);
  margin: 14px 0 2px;
}
.today-date {
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.4em;
  font-variant-numeric: tabular-nums;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
  /* opaque: text scrolling under it must not show through (点検 oshi_design3 A4) */
  background: #fff;
}
.tab {
  position: relative;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: none;
  border: 0;
  min-height: 56px;
  padding: 8px 2px;
  color: var(--sub);
  cursor: pointer;
}
.tab.is-current {
  color: var(--ink);
}
.tab.is-current::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 28px;
  height: 4px;
  margin-left: -14px;
  border-radius: 2px;
  background: var(--accent);
}

/* nothing dated in the next 30 days: the birthday cards (the oshis) come before the empty lists */
#panel-today.is-quiet > .wrap {
  display: flex;
  flex-direction: column;
}
#panel-today.is-quiet > .wrap > h2,
#panel-today.is-quiet .today-date,
#panel-today.is-quiet .nudge {
  order: -2;
}
#panel-today.is-quiet #birthdays-heading,
#panel-today.is-quiet #birthday-list {
  order: -1;
}

/* the first screen while the book is empty: the form is the first thing */
#panel-today.is-empty > .wrap > h2,
#panel-today.is-empty .today-date {
  display: none;
}
.empty {
  font-size: 0.88rem;
  color: var(--sub);
  margin: 0 0 1em;
}
.empty p {
  margin-bottom: 0.6em;
}
.has-quick #start-oshi {
  display: none;
}
.has-quick .empty {
  margin-bottom: 0;
  font-size: 0.82rem;
  line-height: 1.6;
}
.has-quick .empty p {
  margin-bottom: 0.2em;
}
.has-quick .tool-form.is-quick {
  margin-top: 4px;
}
.has-quick .empty .note-more {
  margin: 0;
}

/* forms */
.tool-form {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 12px;
  margin: 8px 0 18px;
  max-width: none;
  box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(43, 37, 34, 0.06);
}
/* the first-screen form: a plain sheet (the punched holes of round 1 drew more eye than the
   fields: 点検 oshi_design1 B1). Only what it takes to save the first record shows. */
.tool-form.is-quick .quick-hide {
  display: none;
}
.tool-form h3 {
  color: var(--ink);
  font-size: 1.05rem;
  margin: 0 0 0.7em;
}
.tool-form .field {
  margin-bottom: 0.75em;
}
.tool-form.is-quick h3 {
  margin-bottom: 0.4em;
}
.tool-form label,
.tool-form legend,
.tool-form .label {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 0.25em;
  padding: 0;
}
.tool-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 0.9em;
  min-width: 0;
}
.tool-form .note {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--sub);
}
.theme-oshi .req {
  color: #a3271c;
  font-size: 0.72rem;
}
.theme-oshi .opt {
  color: var(--sub);
  font-size: 0.72rem;
}
.tool input[type="text"],
.tool select,
.tool textarea,
.tool input[type="date"],
.tool input[type="time"] {
  font: inherit;
  font-size: 16px;
  width: 100%;
  min-height: 48px;
  padding: 0.5em 0.75em;
  border: 1px solid #b4a796;
  border-radius: 10px;
  background: #fff;
  color: inherit;
}
.tool textarea {
  min-height: 5em;
}
#oshi-name {
  font-size: 1.15rem;
  font-weight: 700;
}
.tool ::placeholder {
  color: var(--sub);
  opacity: 1;
  font-weight: 400;
  font-size: 0.9rem;
}
.tool input[type="file"] {
  font: inherit;
  font-size: 0.8rem;
  max-width: 100%;
  color: var(--sub);
}
.tool input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 0.88rem;
  min-height: 44px;
  padding: 0.3em 1em;
  margin-right: 0.6em;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
/* the color field (any color), drawn as one more round sample at the end of the row */
.tool input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  /* a color wheel around the chosen color: "any other color" (点検 oshi_design1 A6) */
  background: conic-gradient(#e03c3c, #f2c500, #3aa655, #3bb4e5, #3a6fd8, #8a5cd0, #e4508a, #e03c3c);
  cursor: pointer;
}
.tool input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.tool input[type="color"]::-webkit-color-swatch {
  border: 3px solid #fff;
  border-radius: 50%;
}
.tool input[type="color"]::-moz-color-swatch {
  border: 3px solid #fff;
  border-radius: 50%;
}
/* all samples in sight (a row scrolling sideways hid the last ones: 点検 oshi_design2 A6) */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 7px;
}
.swatches > * {
  flex: none;
}
.swatch {
  width: 36px;
  height: 36px;
  /* 44px to press: the ring around the dot is part of the button */
  box-sizing: content-box;
  padding: 0;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}
.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ink);
}
.inline {
  display: flex;
  gap: 10px;
}
.inline > * {
  flex: 1;
  min-width: 0;
}
.image-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.image-row input {
  flex: 1;
  min-width: 0;
}
.image-row + p {
  margin: 0.3em 0 0;
}
.anniv-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}
.anniv-row label {
  font-weight: 400;
  font-size: 0.85rem;
}
.anniv-row .anniv-remove {
  justify-self: start;
}
.more-toggle {
  display: none;
}
.tool-form.is-quick .more-toggle {
  display: block;
  margin: 0 0 0.6em;
}
.tool-form.is-quick:not(.show-more) .more-field {
  display: none;
}
.tool-form.is-quick.show-more .more-toggle,
.tool-form.is-quick [data-cancel] {
  display: none;
}
.tool-form .form-buttons .btn {
  flex: 1 1 auto;
}
.tool-form.is-quick .form-buttons .btn {
  width: 100%;
}
.segmented {
  display: flex;
  gap: 8px;
}
.seg,
.chip {
  background: #fff;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.seg {
  flex: 1;
  border-radius: 10px;
  font-weight: 700;
}
.seg[aria-pressed="true"],
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.form-error {
  color: #a3271c;
  font-weight: 700;
  font-size: 0.9rem;
}
.storage-warn {
  background: #fff1d6;
  border-bottom: 1px solid #e8c37a;
  padding: 10px 20px;
  margin: 0;
  font-size: 0.9rem;
}
.storage-warn p {
  margin: 0.3em 0;
}
.storage-info {
  font-size: 0.9rem;
  color: var(--sub);
}
.save-note {
  margin-top: 0.5em;
  margin-bottom: 0.2em;
}

/* the oshi's mark: a round photo, or the first letter on the oshi's (deep) color */
.avatar {
  --c: #e4508a;
  --c-deep: #b6406e;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-deep);
  color: #fff;
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
/* the preview before a name or a picture: an empty frame, not a filled blob */
.avatar-lg:empty {
  background: #fff;
  border: 2px dashed var(--rule);
  box-shadow: none;
}
.avatar-none {
  background: #e9e1d5;
}

/* lists */
.items {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
.item {
  --c: #e4508a;
  --c-deep: #b6406e;
}
.item.no-oshi {
  --c: #b4a796;
  --c-deep: #6b5f57;
}
.item-none {
  color: var(--sub);
  font-size: 0.88rem;
  padding: 6px 0;
}
.item-main {
  flex: 1;
  min-width: 0;
}
.item p {
  margin: 0 0 0.1em;
}
.item-title {
  font-weight: 700;
  line-height: 1.45;
}
.item-sub {
  font-size: 0.83rem;
  color: var(--sub);
}
.item-memo {
  font-size: 0.83rem;
  white-space: pre-wrap;
  border-left: 3px solid var(--c);
  padding: 2px 8px;
  margin-top: 4px !important;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px !important;
}

/* planner rows: the date stands on the left, a dot in the oshi's color before the title */
.plan {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}
.plan:first-child {
  border-top: 1px dashed var(--rule);
}
.plan-date {
  margin: 0 !important;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 10px;
  line-height: 1.15;
}
.plan-md {
  display: block;
  font-size: 0.7rem;
  color: var(--sub);
  white-space: nowrap;
}
.plan-day {
  display: block;
  font-family: var(--round);
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan .item-title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 8px;
  vertical-align: 0.05em;
}
.plan.is-birthday .item-title::before,
.plan.is-anniv .item-title::before {
  border-radius: 2px;
  transform: rotate(45deg);
}
.plan.is-today {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--c);
  padding-left: 8px;
  margin-bottom: 6px;
}

/* the nearest birthday: the top of "今日", in that oshi's (deep) color */
.spotlight {
  --c: #e4508a;
  --c-deep: #b6406e;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--c-deep);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  margin: 10px 0 6px;
}
.spotlight[hidden] {
  display: none;
}
.avatar-xl {
  width: 92px;
  height: 92px;
  font-size: 2.2rem;
  border: 4px solid #fff;
  background: var(--c-deep);
}
.spot-text p {
  margin: 0;
  line-height: 1.3;
}
.spot-name {
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.05rem;
}
.spot-count {
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.1rem;
}
.spot-num {
  font-size: 2.8rem;
  margin: 0 0.12em;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.spot-sub {
  font-size: 0.82rem;
  opacity: 0.95;
}

/* birthdays: photo cards in a row (swipe sideways) */
.birthdays {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
}
.bd-card {
  flex: none;
  width: 156px;
  background: #fff;
  padding: 8px 8px 10px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(43, 37, 34, 0.12), 0 6px 14px rgba(43, 37, 34, 0.07);
  scroll-snap-align: start;
}
.photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  font-size: 2.6rem;
}
.bd-name {
  font-weight: 700;
  margin-top: 8px !important;
}
.bd-card.no-photo {
  border-top: 6px solid var(--c);
}
.bd-card.no-photo .bd-name {
  margin-top: 2px !important;
}
.bd-card .item-sub {
  font-size: 0.75rem;
}
.count-big {
  font-family: var(--round);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-deep);
  line-height: 1.35;
}

/* oshis: a card with the picture large, a strip of tape in the oshi's color */
.oshi-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 14px 12px;
  margin-bottom: 14px;
}
/* the picture framed in the oshi's color (no tape on every card: 点検 oshi_design1 B3) */
.oshi-card .photo {
  border-radius: 10px;
  border: 3px solid var(--c);
}
.oshi-card .item-title {
  font-family: var(--round);
  font-size: 1.15rem;
}
.oshi-card.no-photo {
  grid-template-columns: 1fr;
  border-left: 0;
}
.oshi-card.no-photo .item-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 10px;
  vertical-align: 0.02em;
}

/* goods: a ledger, the price on the right */
#goods-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px;
}
.ledger {
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}
.ledger:last-child {
  border-bottom: 0;
}
.ledger-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.ledger-head .item-title {
  flex: 1;
  min-width: 0;
}
.ledger-head .item-title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 8px;
}
.ledger-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger.is-want .ledger-price {
  color: var(--sub);
}
.status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 2px;
}
.status-have {
  background: var(--ink);
  color: #fff;
}
.status-want {
  border: 1px dashed var(--sub);
  color: var(--ink);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.filters select {
  width: auto;
  flex: 1 1 140px;
  min-height: 44px;
}
.totals {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 8px 2px;
  margin: 0 0 14px;
}
.totals dt {
  font-weight: 700;
}
.totals dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.past summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 0;
  line-height: 24px;
}

/* the message at the bottom, with "元に戻す". It sits at the end of the record book and sticks to
   the bottom of the screen only while the record book is on the screen: it never covers the
   support part or the footer. */
.toast {
  position: sticky;
  bottom: 14px;
  width: calc(100% - 24px);
  box-sizing: border-box;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  max-width: 560px;
  margin: 16px auto 14px;
}
.toast[hidden] {
  display: none;
}
#toast-text {
  flex: 1 1 12em;
}
.toast-buttons {
  margin-left: auto;
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
}
.toast-undo {
  flex: none;
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.3em 1em;
  cursor: pointer;
}
.toast-undo[hidden] {
  display: none;
}
.toast-close {
  font: inherit;
  font-size: 0.85rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.3em 0.9em;
  cursor: pointer;
}
.nudge,
.confirm-box {
  background: #fff7e6;
  border: 1px solid #e8c37a;
  border-radius: 12px;
  padding: 4px 14px;
  margin: 12px 0;
  font-size: 0.9rem;
}
.confirm-box {
  background: #fff;
  border: 2px solid var(--ink);
}
.confirm-box:focus {
  outline: 3px solid #6b4fa8;
  outline-offset: 2px;
}
.private-note {
  background: #f3f0fa;
  border-left: 4px solid #6b4fa8;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
}
#replace-check {
  border-top: 1px dashed #e8c37a;
  margin-top: 8px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* what it cannot do, and support: quieter, after the book */
.theme-oshi #limits {
  padding-top: 28px;
}
.theme-oshi #limits ul {
  padding-left: 1.2em;
  font-size: 0.9rem;
}
/* (display stays list-item: the open/close mark is part of what says "press here") */
.theme-oshi .limits-more summary,
.theme-oshi .note-more summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 0;
  line-height: 24px;
}
.theme-oshi .note-more {
  margin: 4px 0;
  font-size: 0.88rem;
}
.theme-oshi .support {
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 28px 0 28px;
}
.theme-oshi .support h2 {
  font-size: 1.1rem;
}
.theme-oshi .support .cta {
  margin: 1em 0 1.4em;
}
.theme-oshi .support table.kv {
  font-size: 0.85rem;
}
.theme-oshi .support table.kv th {
  background: var(--paper);
  width: 30%;
}
.theme-oshi .support table.kv th,
.theme-oshi .support table.kv td {
  border-color: var(--line);
}

/* ---- phone and tablet (up to 1023px): the title, then the book; the longer explanation after
   the book. The tabs at the bottom of the screen. ---- */
@media (max-width: 1023px) {
  body.theme-oshi {
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
  }
  .theme-oshi .tool-hero,
  .theme-oshi .tool-hero > .wrap,
  .theme-oshi .tool-hero .hero-text {
    display: contents;
  }
  .theme-oshi .topbar {
    order: 0;
  }
  .theme-oshi .tool-hero .eyebrow,
  .theme-oshi .tool-hero h1,
  .theme-oshi .tool-hero .tool-headline {
    order: 1;
    margin-left: max(20px, calc((100% - 640px) / 2));
    margin-right: max(20px, calc((100% - 640px) / 2));
  }
  .theme-oshi .tool-hero .eyebrow {
    align-self: flex-start;
  }
  .theme-oshi noscript,
  .theme-oshi #app {
    order: 2;
  }
  /* The lead and the three points go after the book. Before the name field, the empty note's
     "記録の保存先について" and, right under the save button, the note that the records stay in
     this browser (点検 oshi_design1 A7, oshi_design2 A3: the empty note now stands above the form). */
  .theme-oshi .tool-hero .lead,
  .theme-oshi .tool-hero .points {
    order: 3;
    margin-left: max(20px, calc((100% - 640px) / 2));
    margin-right: max(20px, calc((100% - 640px) / 2));
  }
  .theme-oshi .tool-hero .points {
    margin-bottom: 1em;
  }
  body.is-typing .tabs {
    display: none;
  }
  .theme-oshi .tool-hero .tool-headline + .lead {
    border-top: 1px dashed var(--rule);
    padding-top: 20px;
    margin-top: 12px;
  }
  .theme-oshi #limits {
    order: 4;
  }
  .theme-oshi .support {
    order: 5;
  }
  .theme-oshi footer {
    order: 6;
  }
  .tool .wrap {
    max-width: 680px;
  }
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(43, 37, 34, 0.06);
    padding: 0 max(0px, calc((100% - 640px) / 2));
  }
  .tab.is-current::before {
    top: 0;
  }
  .toast {
    bottom: 72px;
  }
  html {
    scroll-padding-bottom: 72px;
  }
}

/* ---- PC (1024px and wider): the title stays on the left, the book on the right ---- */
@media (min-width: 1024px) {
  body.theme-oshi {
    display: grid;
    grid-template-columns: 1fr minmax(0, 330px) minmax(0, 640px) 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .theme-oshi .topbar,
  .theme-oshi footer {
    grid-column: 1 / -1;
  }
  /* the top bar and the footer line up with the two columns (330 + 56 + 640) */
  .theme-oshi .topbar .wrap,
  .theme-oshi footer .wrap {
    max-width: 1066px;
  }
  .theme-oshi .tool-hero {
    grid-column: 2;
    grid-row: 2 / span 3;
    position: sticky;
    top: 0;
    padding: 28px 0;
  }
  .theme-oshi .tool-hero .wrap,
  .theme-oshi .tool .wrap,
  .theme-oshi #limits .wrap,
  .theme-oshi .support .wrap {
    max-width: none;
    padding: 0;
  }
  .theme-oshi .tool-hero h1 {
    font-size: 2rem;
  }
  .theme-oshi .tool-hero .tool-headline {
    font-size: 1.05rem;
    margin-bottom: 1.2em;
  }
  .theme-oshi .tool-hero .lead {
    font-size: 0.92rem;
  }
  .theme-oshi noscript,
  .theme-oshi #app,
  .theme-oshi #limits,
  .theme-oshi .support {
    grid-column: 3;
  }
  .theme-oshi .support {
    background: transparent;
    border-top: 1px dashed var(--rule);
    margin-top: 12px;
  }
  .theme-oshi footer {
    margin-top: 40px;
  }
  .tabs {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--line);
    margin-top: 16px;
    background: var(--paper);
  }
  .tab {
    font-size: 0.95rem;
    min-height: 52px;
  }
  .tab.is-current::before {
    bottom: 0;
  }
  .anniv-row {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}
