*,
:before,
::before,
:after,
::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  min-height: 100vh;
  background: #ece7dc;
  color: #1a2b4a;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  color: inherit;
  font-family: inherit;
}

button {
  background-color: transparent;
  cursor: pointer;
}

svg {
  display: block;
}

img {
  display: block;
  max-width: 100%;
}

.Perspective {
  max-width: 960px;
  margin: 24px auto;
  padding: 28px 24px 32px;
  background: #fbfaf6;
  border-radius: 12px;
  box-shadow: 0 1px 0 #fff, 0 24px 60px -40px rgba(26, 43, 74, 0.5);
  color: #1a2b4a;
  font-family: "Iowan Old Style", Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
}
.Perspective-Header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}
.Perspective-Kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c8452f;
  margin-bottom: 8px;
}
.Perspective-Title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.Perspective-Lead {
  max-width: 340px;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #4a5a72;
}
.Perspective-Stage {
  border: 1px solid rgba(26, 43, 74, 0.13);
  border-radius: 8px;
  overflow: hidden;
  background: #f2ede2;
  box-shadow: 0 1px 0 #fff, 0 12px 30px -18px rgba(26, 43, 74, 0.4);
}
.Perspective-Svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
.Perspective-Svg-Label {
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.Perspective-Foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
}
.Perspective-Foot-Hint {
  flex: 1;
  min-width: 220px;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #4a5a72;
}
.Perspective-UsageSlot:empty {
  display: none;
}

.ModeRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.ModeButton {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 12px 12px 13px;
  border: 1px solid rgba(26, 43, 74, 0.13);
  border-radius: 7px;
  background: #fff;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  transition: transform 0.15s, border-color 0.15s;
}
.ModeButton:hover {
  border-color: rgba(26, 43, 74, 0.33);
  transform: translateY(-1px);
}
.ModeButton[data-selected] {
  background: #1a2b4a;
  border-color: #1a2b4a;
}
.ModeButton-Number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #c8452f;
}
.ModeButton-Name {
  font-size: 15px;
  font-weight: 600;
  color: #1a2b4a;
}
.ModeButton-Description {
  font-size: 11px;
  line-height: 1.4;
  color: #4a5a72;
}
.ModeButton[data-selected] .ModeButton-Number {
  color: #ff9d86;
}
.ModeButton[data-selected] .ModeButton-Name {
  color: #f2ede2;
}
.ModeButton[data-selected] .ModeButton-Description {
  color: #c9d4e3;
}

.ControlPanel {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(26, 43, 74, 0.1);
  border-radius: 8px;
}
.ControlPanel-Row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ControlPanel-Hint {
  margin-left: auto;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 12px;
  color: #4a5a72;
}
.ControlPanel-Sliders {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 12px;
}

.BoxCount {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a2b4a;
}
.BoxCount-Value {
  font-variant-numeric: tabular-nums;
  color: #c8452f;
}

.MiniButton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(26, 43, 74, 0.2);
  border-radius: 6px;
  background: #fff;
  color: #1a2b4a;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.MiniButton:hover {
  background: #1a2b4a;
  color: #f2ede2;
}
.MiniButton[data-disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.MiniButton-Icon {
  display: inline-flex;
  align-items: center;
}

.Slider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  color: #4a5a72;
}
.Slider-Label {
  min-width: 28px;
}
.Slider-Input {
  width: 150px;
  accent-color: #c8452f;
}

.Toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #4a5a72;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.Toggle-Mark {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(26, 43, 74, 0.35);
  border-radius: 2px;
  background: #fff;
}
.Toggle[data-checked] .Toggle-Mark {
  background: #c8452f;
  border-color: #c8452f;
}
.Toggle[data-checked] .Toggle-Mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.UsagePanel {
  margin-top: 20px;
  border: 1px solid rgba(26, 43, 74, 0.13);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.UsagePanel:not([data-open]) {
  display: none;
}
.UsagePanel-Header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 8px 0 14px;
  background: #f6f4ee;
}
.UsagePanel-Title {
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1a2b4a;
}
.UsagePanel-Close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #4a5a72;
  cursor: pointer;
}
.UsagePanel-Body {
  padding: 16px 18px 18px;
}
.UsagePanel-Heading {
  font-family: "Iowan Old Style", Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a2b4a;
  margin-bottom: 12px;
}
.UsagePanel-Paragraph {
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #4a5a72;
}
.UsagePanel-Paragraph + .UsagePanel-Paragraph {
  margin-top: 10px;
}