:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #21362d;
  background: #f6f2e9;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

.site-header { border-bottom: 1px solid #e5e0d6; }
.header-inner {
  max-width: 1180px;
  margin-inline: auto;
  min-height: 57px;
  padding: 0 26px;
  display: flex;
  align-items: center;
}
.signature { font-size: 1.12rem; font-weight: 750; letter-spacing: -.055em; }

main { max-width: 1052px; margin: auto; padding: 24px 26px 20px; }
.intro { margin: 0 0 18px; }
h1 {
  margin: 0 0 4px;
  font: 500 clamp(2.05rem, 5.5vw, 3rem)/1.05 Georgia, serif;
  letter-spacing: -.047em;
}
p { margin: 0; }
.intro p { color: #4d6156; line-height: 1.5; font-size: .95rem; }

.viewer {
  overflow: hidden;
  background: #fbf8f0;
  border: 1px solid #e1dbcf;
  border-radius: 22px;
  box-shadow: 0 7px 28px #4b382011;
}
.stage {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  min-height: 318px;
  height: min(62dvh, 620px);
  background: radial-gradient(ellipse at 50% 76%, #fffcf5 0%, #f6f0e5 60%, #ede5d8 100%);
}
.canvas-holder, .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-holder { opacity: 0; pointer-events: none; }
.stage[data-ready="true"] .canvas-holder { opacity: 1; pointer-events: auto; }
.stage[data-ready="true"] .poster { visibility: hidden; }
.poster { object-fit: contain; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }

.status {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 9px 15px;
  border-radius: 12px;
  background: #fffcf6f5;
  border: 1px solid #e3ddd2;
  color: #344a3d;
  text-align: center;
  font-size: .85rem;
}
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e4ded2;
}
.view-buttons, .zoom-buttons { display: flex; align-items: center; gap: 4px; }

button {
  min-height: 41px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: #385246;
  font-family: inherit;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
button:hover { background: #ede9df; }
button[aria-pressed="true"] { background: #e7eee4; color: #223c2f; border-color: #d7e1d3; }
.zoom-buttons button { min-width: 42px; padding: 0; font-size: 1.2rem; }
button:focus-visible, canvas:focus-visible { outline: 2px solid #43654f; outline-offset: -3px; }
.hint { margin-top: 11px; text-align: center; color: #52655a; font-size: .8rem; }
.touch { display: none; }

@media (pointer: coarse) {
  .mouse { display: none; }
  .touch { display: inline; }
  button { min-height: 44px; }
}
@media (max-width: 480px) {
  main { padding: 21px 12px 14px; }
  .header-inner { padding: 0 18px; min-height: 50px; }
  .intro { padding-inline: 6px; margin-bottom: 13px; }
  .stage { height: min(60dvh, 510px); min-height: 310px; }
  .viewer { border-radius: 17px; }
  .controls { padding: 7px; gap: 5px; }
  button { padding-inline: 10px; }
  .zoom-buttons button { min-width: 37px; }
}
