:root {
  --ink: #2f4248;
  --muted: #5f6f78;
  --brown: #4a8588;
  --line: #9fb9bb;
  --line-soft: #dce7e8;
  --orange: #64c6c7;
  --orange-dark: #2e8587;
  --green: #64c6c7;
  --green-dark: #2e8587;
  --cream: #fff7e5;
  --sand: #f5deb3;
  --wash: #fffaf0;
  --paper: #fff;
  --good: #f6de7d;
  --bad: #708090;
  --bad-fill: #e2e7ea;
  --strong: #f7f9fa;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: #fff;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}
a {
  color: inherit;
  text-decoration: none;
}
.eyebrow {
  display: block;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.19em;
}
header {
  min-height: 112px;
  padding: 14px max(4vw, 24px) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  background: #fff;
  border-bottom: 2px solid var(--brown);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}
.brand em {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brown);
  border-radius: 50%;
  font-style: normal;
  font-family: serif;
  color: var(--orange-dark);
}
.brand em svg {
  width: 18px;
  height: 18px;
}
.brand span {
  display: grid;
  line-height: 1.15;
}
.brand b {
  font-size: 22px;
  letter-spacing: 0.14em;
}
.brand small {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
header nav {
  grid-column: 1/-1;
  grid-row: 2;
  justify-self: center;
  display: flex;
  gap: 34px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}
header nav a {
  padding: 10px 0 12px;
  border-bottom: 3px solid transparent;
}
header nav a:hover {
  color: var(--orange-dark);
  border-color: var(--orange);
}
.menu {
  display: none;
  justify-self: end;
  border: 0;
  background: transparent;
  padding: 8px;
}
.intro {
  max-width: 1280px;
  margin: auto;
  padding: 46px 24px 32px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.intro h1 {
  margin: 8px 0 5px;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.2;
  letter-spacing: 0.07em;
}
.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.intro aside {
  width: 260px;
  padding: 12px 0 8px 20px;
  display: grid;
  border-left: 5px solid var(--brown);
}
.intro aside span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  color: var(--orange-dark);
}
.intro aside b {
  font-size: 19px;
  margin: 3px 0;
}
.intro aside small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.card {
  background: #fff;
}
.personal {
  max-width: 1232px;
  margin: 22px auto 24px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--brown);
  border-top: 5px solid var(--green);
  background: var(--cream);
}
.ptitle {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ptitle svg {
  width: 22px;
  color: var(--orange-dark);
}
.ptitle h2 {
  margin: 1px 0 0;
  font-size: 23px;
  letter-spacing: 0.05em;
}
.personal-guide {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.controls {
  display: flex;
  align-items: end;
  gap: 18px;
}
.field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}
.field select,
.field input,
.travelinputs input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  color: #909090;
}
.field select {
  min-width: 160px;
}
.controls fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.controls legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}
.controls fieldset label {
  margin-right: 12px;
  font-size: 19px;
  white-space: nowrap;
}
.controls input {
  accent-color: var(--orange);
}
.control-links {
  margin-left: auto;
  display: grid;
  justify-items: end;
  gap: 5px;
}
.control-links a {
  width: max-content;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--orange);
  color: var(--orange-dark);
  font-size: 15px;
}
.dashboard {
  max-width: 1280px;
  margin: auto;
  padding: 0 24px 72px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 0;
  border: 0;
}
.dashboard > .card {
  border: 1px solid var(--brown);
}
.dashboard > .monthly {
  border-left: 0;
}
.today,
.monthly {
  padding: 28px 30px 26px;
  position: relative;
  display: flex;
  flex-direction: column;
}
/*
.today:before,
.monthly:before {
  position: absolute;
  right: 24px;
  top: 18px;
  color: #a7b5ba;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}
.today:before {
  content: "01";
}
.monthly:before {
  content: "02";
}
*/
.head {
  padding: 0 0 17px 0;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.04em;
}
.date-nav {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-nav button,
.calnav button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--brown);
  background: var(--cream);
}
.date-nav button:hover,
.calnav button:hover {
  background: #fff;
  color: var(--orange-dark);
}
.date-nav svg,
.calnav svg {
  width: 17px;
}
.today-ganzhi,
.month-boundary {
  margin: 8px 0 0;
  font-size: 17px;
  color: var(--muted);
}
.today-ganzhi-mobile {
  display: none;
}
.month-boundary {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
}
.month-boundary strong {
  color: var(--orange-dark);
}
.boardrow {
  flex: 1;
  display: grid;
  place-items: center;
  padding-top: 2px;
}
.boardrow > div {
  width: 100%;
  text-align: center;
}
.boardrow label,
.twoboards label {
  display: block;
  margin-bottom: 5px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.twoboards {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.board {
  width: min(308px, 32vw);
  height: auto;
  display: block;
  margin: auto;
  overflow: visible;
}
.twoboards .board {
  width: min(224px, 22vw);
}
.board .sector {
  fill: #fff;
  stroke: var(--brown);
  stroke-width: 1.25;
}
.board .sector.good {
  fill: var(--good);
}
.board .sector.bad {
  fill: var(--bad-fill);
  stroke: var(--bad);
  stroke-width: 1.8;
}
.board .sector.strong {
  fill: var(--bad-fill);
  stroke: var(--bad);
  stroke-width: 1.8;
}
.board .sector.center-five {
  fill: var(--bad-fill);
  stroke: var(--bad);
}
.board .break-sector {
  fill: var(--bad-fill);
  stroke: var(--bad);
  stroke-width: 1.5;
  pointer-events: none;
}
.board text {
  font:
    700 15px Arial,
    sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--ink);
}
.board .center-number {
  font-size: 21px;
}
.board .mark-chip circle,
.board .break-chip circle {
  fill: #fff;
  stroke: var(--brown);
  stroke-width: 1.1;
}
.board .mark-chip text,
.board .break-chip text {
  font-size: 11px;
  font-weight: 900;
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.board .cardinals text {
  font-size: 13px;
  font-weight: 900;
  fill: var(--brown);
}
.cycle-stars {
  margin: 14px auto 0;
  border-collapse: collapse;
  text-align: center;
  min-width: 156px;
}
.cycle-stars th,
.cycle-stars td {
  width: 52px;
  padding: 1px 8px;
  border-right: 1px solid var(--line-soft);
}
.cycle-stars th:last-child,
.cycle-stars td:last-child {
  border: 0;
}
.cycle-stars th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
}
.cycle-stars td {
  font-size: 18px;
  font-weight: 900;
}
.todayfacts {
  margin-top: 9px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
}
.goodtext {
  color: #6c5900;
}
.badtext {
  color: #4d5d66;
}
.legend {
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
}
.legend .g {
  background: var(--good);
}
.legend .b {
  background: var(--bad-fill);
  border-color: var(--bad);
}
.legend b {
  margin-left: auto;
  color: var(--orange-dark);
  font-size: 11px;
}
.calendar {
  padding: 30px max(3vw, 18px);
  border-top: 1px solid var(--brown);
  background: #eef9f9;
}
.sectitle {
  max-width: 1232px;
  margin: 0 auto 25px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.sectitle h2 {
  margin: 5px 0 0;
  font-size: 29px;
  letter-spacing: 0.06em;
}
.sectitle p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.calshell {
  max-width: 1232px;
  margin: auto;
  border: 1px solid var(--brown);
  background: #fff;
}
.calnav {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-bottom: 1px solid var(--brown);
}
.cal-month-picker input {
  min-width: 184px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}
.swipe-note {
  display: none;
}
.calendar-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.calendar-grid {
  width: 100%;
  min-width: 0;
}
.week,
.days {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.week {
  border-bottom: 1px solid var(--brown);
}
.week span {
  padding: 8px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 800;
}
.week span:last-child {
  border-right: 0;
}
.sun {
  color: #ff6c6c;
  background: #ffeeee;
}
.sat {
  color: var(--green-dark);
  background: #f1ffff;
}
.days > button,
.days > span {
  min-width: 0;
  min-height: clamp(170px, calc((100vw - 150px) / 7 + 48px), 222px);
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.days > button {
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}
/*
.days > button:hover {
  background: var(--cream);
}
*/
.days > button.unsupported,
.days > button.unsupported:hover {
  background: #f3f3f1;
  color: var(--muted);
  cursor: not-allowed;
}
.days .unsupported-note {
  margin: auto 0;
  color: var(--muted);
  font-weight: 500;
}
.days > button.current {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
  background: var(--cream);
}
.days > button.switch-day {
  background: #eef9f9;
  box-shadow: inset 0 4px 0 var(--green);
}
.days > button.turn-day::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 4px;
  background: var(--brown);
  pointer-events: none;
}
.days > button.turn-day.turn-sunday::before {
  right: 0;
  bottom: auto;
  left: 0;
  width: auto;
  height: 4px;
}
.days > button > b {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  line-height: 1.25;
}
.days > button > b em {
  font-size: 19px;
  font-style: normal;
  font-weight: 500;
  color: var(--orange-dark);
}
.board.mini {
  width: min(174px, calc((100vw - 150px) / 7));
}
.board.mini text {
  font-size: 14px;
}
.board.mini .center-number {
  font-size: 20px;
}
.days button > small {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.days .turn-label {
  margin-top: 2px;
  padding: 2px 8px;
  border: 1px solid var(--brown);
  background: #fff;
  color: var(--brown);
  letter-spacing: 0.08em;
}
.days .sekki {
  max-width: 100%;
  padding: 3px 5px;
  background: var(--green);
  color: #214f50;
  font-size: 10px;
  line-height: 1.35;
}
.days > button.doyo {
  box-shadow: none;
}
.days > button.doyo::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 1px;
  right: 1px;
  bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
  pointer-events: none;
}
.callegend {
  padding: 12px 15px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.callegend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.callegend i {
  width: 16px;
  height: 16px;
  border: 2px solid var(--orange);
  background: var(--cream);
}
.doyoline:before {
  content: "";
  width: 24px;
  height: 4px;
  display: inline-block;
  margin-right: 6px;
  background: var(--orange);
}
.legendwrap {
  max-width: 1232px;
  margin: 18px auto 0;
}
.fulllegend {
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--brown);
  background: #fff;
  font-size: 13px;
}
.fulllegend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fulllegend > strong {
  color: var(--orange-dark);
}
.fulllegend i {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
}
.lg-good {
  background: var(--good);
}
.lg-bad {
  background: var(--bad-fill);
  border-color: var(--bad) !important;
}
.fulllegend span b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brown);
  border-radius: 50%;
  font-size: 11px;
}
.fulllegend small {
  margin-left: auto;
  color: var(--muted);
}
.travel {
  max-width: 1280px;
  margin: auto;
  padding: 78px 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 58px;
  align-items: stretch;
  border-bottom: 1px solid var(--brown);
}
.travel h2,
.lookup h2 {
  margin: 7px 0 10px;
  font-size: 31px;
  letter-spacing: 0.06em;
}
.travel p,
.lookup p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.travelinputs {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.travelinputs label {
  min-width: 0;
  display: grid;
  gap: 5px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}
.travelmonth {
  grid-column: 1/-1;
}
.travelmonth input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.primary {
  min-height: 45px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
}
.primary:hover {
  background: var(--orange-dark);
  color: #fff;
}
.primary svg {
  width: 18px;
}
.travelinputs .primary {
  grid-column: 1/-1;
}
.cost-note {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}
.travelanswer {
  margin-top: 16px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  border: 1px solid var(--brown);
  background: var(--cream);
  font-size: 13px;
}
.travelanswer strong {
  font-size: 23px;
  color: var(--orange-dark);
}
.travelanswer b {
  line-height: 1.8;
}
.mapwrap {
  min-height: 390px;
  position: relative;
  border: 1px solid var(--brown);
  background: var(--wash) url("../assets/map-placeholder.png") center / cover
    no-repeat;
  overflow: hidden;
}
.googlemap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.mapempty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff42;
  color: var(--muted);
}
.mapempty svg {
  width: 30px;
}
.mapstatus {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  margin: 0 !important;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--brown);
  background: #fffffff2 !important;
  color: var(--ink) !important;
  font-size: 12px !important;
}
.mapstatus svg {
  width: 17px;
}
.mapstatus.ready {
  border-left: 5px solid var(--green);
}
.lookup {
  padding: 54px max(8vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  background: var(--wash);
  border-bottom: 1px solid var(--brown);
}
.lookupform {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.lookup output {
  width: 100%;
  padding-top: 13px;
  display: flex;
  gap: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.lookup output b {
  margin-left: 5px;
  color: var(--orange-dark);
  font-size: 16px;
}
.glossary {
  width: 100%;
  min-width: 0;
  padding: 72px max(4vw, 20px);
  background: #fff;
}
.glossary-head {
  max-width: 1180px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: end;
}
.glossary-head .eyebrow,
.glossary-head h2 {
  grid-column: 1;
}
.glossary-head h2 {
  margin: 7px 0 0;
  font-size: 29px;
  letter-spacing: 0.05em;
}
.glossary-head p {
  grid-column: 2;
  grid-row: 1/3;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.glossary-grid {
  min-width: 0;
  max-width: 1180px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--brown);
  border-left: 1px solid var(--brown);
}
.glossary-grid article {
  min-width: 0;
  min-height: 216px;
  padding: 27px 30px;
  position: relative;
  border-right: 1px solid var(--brown);
  border-bottom: 1px solid var(--brown);
}
.glossary-no {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #b7c3c7;
  font-size: 40px;
  font-weight: 300;
}
.glossary-title {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 0;
}
.glossary-title > b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brown);
  border-radius: 50%;
}
.glossary-title h3 {
  margin: 0;
  font-size: 20px;
}
.glossary-title h3 small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.glossary-grid article > p {
  margin: 17px 0;
  color: #42555c;
  font-size: 14px;
  line-height: 1.85;
}
.glossary-display {
  padding: 4px 8px;
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
}
.child-table {
  max-width: 1180px;
  margin: 44px auto 0;
  padding-top: 28px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: end;
  border-top: 4px solid var(--brown);
}
.child-table h3 {
  margin: 6px 0;
  font-size: 22px;
}
.child-table p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--brown) var(--line-soft);
  scrollbar-width: thin;
}
.table-swipe-note {
  display: none;
}
.child-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 11px;
}
.child-table th,
.child-table td {
  padding: 8px 4px;
  border: 1px solid var(--line-soft);
  text-align: center;
  white-space: nowrap;
}
.child-table th:first-child {
  width: 58px;
}
.child-table thead th {
  background: var(--line-soft);
}
.child-table tbody th {
  background: var(--sand);
}
.glossary-note {
  max-width: 1180px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 12px;
}
footer {
  padding: 48px 20px;
  display: grid;
  justify-items: center;
  gap: 10px;
  border-top: 1px solid var(--brown);
  text-align: center;
}
footer .brand {
  display: flex;
}
footer p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.13em;
}
footer > small {
  color: var(--muted);
  font-size: 10px;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 18px;
  display: grid;
  place-items: center;
  background: #2f4248aa;
}
.modal {
  width: min(430px, 96vw);
  padding: 30px;
  position: relative;
  border: 1px solid var(--brown);
  background: #fff;
  text-align: center;
}
.modal > button {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 0;
  background: transparent;
}
.modal h2 {
  font-size: 17px;
}
.modal h2 strong {
  font-size: 28px;
}
.modal .board {
  width: 220px;
  margin: 20px auto;
}
.modal .cycle-stars {
  margin-bottom: 18px;
}
.modal-star-name {
  margin: -12px 0 16px;
  font-size: 28px;
  font-weight: 800;
}
.modal > div:last-child {
  padding-top: 14px;
  display: flex;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.personal-first {
  margin-top: 28px;
}
.navhead > div {
  width: 100%;
}
.navhead .date-nav {
  justify-content: center;
}
.today-ganzhi,
.month-boundary {
  justify-content: center;
  text-align: center;
}
.monthly-guide {
  max-width: 420px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.calendar-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.calendar-title > p {
  justify-self: end;
}
.calendar-bases {
  display: flex;
  align-items: center;
  gap: 20px;
}
.calendar-bases > div {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 10px 6px;
}
.calendar-bases span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
}
.calendar-bases span b {
  display: block;
  margin-top: 1px;
  color: var(--green-dark);
  font-size: 11px;
  letter-spacing: 0;
}
.calendar-bases .board {
  width: 158px;
}
.board.mini .mini-mark text {
  font-size: 12px;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.legendwrap {
  margin-top: 0;
}
.legendwrap .fulllegend {
  border-top: 0;
}
.star-age-guide {
  scroll-margin-top: 132px;
  padding: 34px max(8vw, 28px);
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 54px;
  align-items: center;
  border-bottom: 1px solid var(--brown);
  background: #fff;
}
.star-age-guide h2 {
  margin: 6px 0 7px;
  font-size: 24px;
  letter-spacing: 0.05em;
}
.star-age-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.star-age-guide ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  border-top: 1px solid var(--brown);
  border-left: 1px solid var(--brown);
}
.star-age-guide li {
  min-height: 76px;
  padding: 12px;
  display: grid;
  align-content: center;
  border-right: 1px solid var(--brown);
  border-bottom: 1px solid var(--brown);
}
.star-age-guide li b {
  color: var(--orange-dark);
  font-size: 13px;
}
.star-age-guide li span {
  font-size: 14px;
  font-weight: 800;
}
.child-guide-card {
  grid-column: 1/-1;
}
/*
.child-inline {
  min-width: 0;
  max-width: 100%;
  margin-top: 20px;
  padding-top: 18px;
  display: block;
  border-top: 1px solid var(--brown);
}
  */
.child-inline > div:not(.table-scroll) {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}
.child-inline > div:not(.table-scroll) b {
  font-size: 15px;
}
.child-inline > div:not(.table-scroll) span {
  color: var(--muted);
  font-size: 11px;
}
.child-inline table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 11px;
}
.child-inline th,
.child-inline td {
  padding: 7px 4px;
  border: 1px solid var(--line-soft);
  text-align: center;
  white-space: nowrap;
}
.child-inline th:first-child {
  width: 54px;
}
.child-inline th:nth-child(2) {
  width: 118px;
  white-space: normal;
  line-height: 1.4;
}
.child-inline thead th {
  background: #e4edef;
}
.child-inline tbody th {
  background: var(--sand);
}
@media (max-width: 900px) {
  header {
    min-height: 72px;
    padding: 10px 18px;
    grid-template-rows: auto;
  }
  .brand {
    grid-column: 2;
    grid-row: 1;
  }
  .brand em {
    width: 32px;
    height: 32px;
  }
  .brand b {
    font-size: 22px;
  }
  header nav {
    display: none;
  }
  header nav.is-open {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 10px 0 2px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 20px;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
    letter-spacing: 0;
  }
  header nav.is-open a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 2px;
  }
  .menu {
    display: grid;
    grid-column: 3;
  }
  .intro {
    padding: 31px 18px 24px;
  }
  .intro aside {
    display: none;
  }
  .intro h1 {
    font-size: 27px;
  }
  .intro p {
    font-size: 14px;
  }
  .personal {
    margin: 16px 14px 18px;
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .personal-first {
    margin-top: 16px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .control-links {
    margin-left: 0;
    justify-items: start;
  }
  .dashboard {
    grid-template-columns: 1fr;
    padding: 0 14px 50px;
    border: 0;
  }
  .dashboard > .card {
    min-width: 0;
    border: 1px solid var(--brown);
  }
  .dashboard > .monthly {
    border-left: 1px solid var(--brown);
    border-top: 0;
  }
  .today,
  .monthly {
    padding: 24px 20px;
  }
  .board {
    width: min(300px, 70vw);
  }
  .twoboards .board {
    width: min(220px, 38vw);
  }
  .calendar {
    padding: 50px 10px;
  }
  .sectitle {
    display: block;
    padding: 0 6px;
  }
  .calendar-title {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .calendar-title > p {
    grid-column: 1/-1;
    justify-self: start;
  }
  .calendar-bases .board {
    width: 137px;
  }
  .sectitle p {
    margin-top: 6px;
  }
  .swipe-note {
    display: block;
    margin: 0;
    padding: 8px;
    border-bottom: 1px solid var(--brown);
    background: var(--cream);
    text-align: center;
    color: #ff7f6c;
    font-size: 12px;
  }
  .calendar-grid {
    /*min-width: 1330px;*/
  }
  .board.mini {
    width: 100%;
  }
  .travel {
    grid-template-columns: 1fr;
    padding: 58px 18px;
    gap: 28px;
  }
  .mapwrap {
    min-height: 360px;
  }
  .lookup {
    display: block;
    padding: 46px 22px;
  }
  .star-age-guide {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 36px 22px;
  }
  .lookupform {
    margin-top: 20px;
  }
  .glossary {
    padding: 56px 14px;
  }
  .glossary-head {
    display: block;
  }
  .glossary-head p {
    margin-top: 8px;
  }
  .glossary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .glossary-grid article {
    min-height: 0;
  }
  .child-guide-card {
    grid-column: auto;
  }
  .child-inline {
    display: block;
  }
  .child-table {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .child-table table {
    min-width: 740px;
  }
}
@media (max-width: 520px) {
  /* 小さな画面では本文と操作の文字を先に読める大きさにする。 */
  .eyebrow {
    font-size: 12px;
  }
  .field,
  .controls legend,
  .travelinputs label {
    font-size: 20px;
  }
  .field input,
  .field select,
  .travelinputs input {
    min-height: 48px;
    font-size: 16px;
  }
  .date-nav button,
  .calnav button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
  .today-ganzhi, .month-boundary, .monthly-guide,
  .calendar-title > p, .travel p, .lookup p,
  .star-age-guide p, .glossary-head p, .glossary-grid article > p,
  .glossary-note {
    font-size: 15px;
    line-height: 1.7;
  }
  .today-ganzhi-desktop {
    display: none;
  }
  .today-ganzhi-mobile {
    margin: 10px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(52px, auto));
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    text-align: center;
  }
  .today-ganzhi-mobile span {
    display: grid;
    gap: 2px;
  }
  .today-ganzhi-mobile small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  .today-ganzhi-mobile strong {
    font-size: 21px;
    letter-spacing: 0.06em;
  }
  .boardrow label, .twoboards label, .todayfacts,
  .legend, .legend b, .fulllegend, .callegend,
  .star-age-guide li b,
  .star-age-guide li span {
    font-size: 14px;
  }
  .swipe-note {
    font-size: 15px;
  }
  .week span,
  .days > button > b {
    font-size: 16px;
  }
  .days > button > b em, .days button > small,
  .days .sekki {
    font-size: 11px;
  }
  .board.mini text {
    font-size: 16px;
  }
  .board.mini .center-number {
    font-size: 22px;
  }
  .board.mini .mini-mark text {
    font-size: 18px;
  }
  .calendar-bases span,
  .calendar-bases span b {
    font-size: 13px;
  }
  .child-inline table {
    font-size: 13px;
  }
  .child-inline th,
  .child-inline td {
    padding: 9px 6px;
  }
  .glossary-title h3 small,
  .glossary-display {
    font-size: 13px;
  }
  footer > small,
  .mapstatus,
  .cost-note {
    font-size: 13px !important;
  }
  .intro {
    padding-top: 25px;
  }
  .intro h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 13px;
  }
  .personal {
    margin-inline: 8px;
    border-top-width: 4px;
  }
  .controls {
    display: grid;
    grid-template-columns: 1fr;
  }
  .field select {
    width: 100%;
    min-width: 0;
  }
  .controls fieldset,
  .control-links {
    grid-column: 1/-1;
  }
  .dashboard {
    padding-inline: 8px;
  }
  .today,
  .monthly {
    padding: 21px 12px;
  }
  .today:before,
  .monthly:before {
    display: none;
  }
  .head {
    padding-right: 0;
  }
  .date-nav {
    justify-content: space-between;
  }
  .calendar-title {
    grid-template-columns: 1fr;
  }
  .calendar-bases {
    justify-content: flex-start;
    gap: 8px;
  }
  .calendar-bases > div {
    width: calc((100% - 8px) / 2);
    min-width: 0;
    padding-inline: 5px;
  }
  .calendar-title > p {
    grid-column: auto;
  }
  .calendar-bases .board {
    width: min(130px, 30vw);
  }
  .date-nav h2 {
    font-size: 22px;
    white-space: nowrap;
  }
  .board {
    width: min(280px, 82vw);
  }
  .twoboards {
    grid-template-columns: 1fr 1fr;
  }
  .twoboards > div {
    padding: 7px 0 15px;
    border-bottom: 0;
  }
  .twoboards > div:last-child {
    border-bottom: 0;
  }
  .twoboards .board {
    width: min(180px, 41vw);
  }
  .legend {
    flex-wrap: wrap;
  }
  .legend b {
    width: 100%;
    margin: 0;
  }
  .todayfacts {
    font-size: 14px;
  }
  .sectitle h2 {
    font-size: 25px;
  }
  .calnav {
    gap: 12px;
  }
  .cal-month-picker input {
    min-width: 156px;
    font-size: 16px;
  }
  .calendar-grid {
    /*min-width: 1330px;*/
  }
  .days > button,
  .days > span {
    /*min-height: 211px;*/
    min-height: clamp(100px, calc((100vw - 150px) / 7 + 48px), 222px);
  }
  .board.mini {
    width: 163px;
    width: 100%;
  }
  .fulllegend {
    font-size: 14px;
  }
  .fulllegend small {
    width: 100%;
    margin: 0;
  }
  .travelinputs {
    grid-template-columns: minmax(0, 1fr);
  }
  .travelmonth,
  .travelinputs .primary {
    grid-column: auto;
  }
  .travel h2,
  .lookup h2 {
    font-size: 26px;
  }
  .mapwrap {
    min-height: 320px;
  }
  .mapstatus {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .lookupform {
    display: grid;
  }
  .lookupform .primary {
    width: 100%;
  }
  .lookup output {
    display: grid;
    gap: 5px;
  }
  .star-age-guide ol {
    grid-template-columns: 1fr 1fr;
  }
  .glossary-head h2 {
    font-size: 25px;
  }
  .glossary-grid article {
    padding: 24px 19px;
  }
  .glossary-grid .child-guide-card {
    overflow: hidden;
  }
  .child-inline .table-scroll {
    overscroll-behavior-inline: contain;
    border: 1px solid var(--line-soft);
    text-align: center;
  }
  .table-swipe-note {
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 14px;
  }
  .child-inline table {
    min-width: 680px;
  }
  .glossary-no {
    font-size: 34px;
  }
  .glossary-title h3 {
    font-size: 18px;
  }
  .modal {
    width: min(340px, 96vw);
  }
  .dashboard > .monthly {
    display: none;
  }
  .glossary-note {
    font-size: 11px;
  }
}
