:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #111;
  --muted: #686868;
  --line: #e6e6e6;
  --soft: #f5f5f3;
  --panel: #f0f0ed;
  --radius: 18px;
  --page: min(1440px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: #111; color: #fff; padding: 12px 16px; }
.skip-link:focus { top: 16px; }
.site-header {
  width: var(--page);
  height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -.03em; width: fit-content; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; position: relative; }
.brand-mark span { position: absolute; width: 19px; height: 12px; border: 1.7px solid #111; border-radius: 50%; }
.brand-mark span:nth-child(2) { transform: rotate(60deg); }
.brand-mark span:nth-child(3) { transform: rotate(120deg); }
.main-nav { display: flex; gap: 30px; color: #555; font-size: 13px; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #111; }
.header-action { justify-self: end; border: 1px solid #222; background: #111; color: #fff; padding: 10px 16px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; transition: transform .2s, background .2s; }
.header-action:hover { transform: translateY(-1px); background: #333; }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 9px; }
.login-button { border: 0; background: transparent; cursor: pointer; font-size: 11px; color: #666; padding: 9px 4px; }
.login-button:hover { color: #111; }
.login-button.authenticated { color: #111; }

.hero { width: var(--page); margin: 0 auto; min-height: 520px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; padding: 72px 0 58px; }
.hero-copy { max-width: 710px; }
.kicker { margin: 0 0 16px; color: #777; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.hero h1 { margin: 0; font-size: clamp(48px, 6.2vw, 92px); line-height: .98; letter-spacing: -.075em; font-weight: 600; }
.hero h1 span { display: block; color: #9a9a9a; }
.hero-lead { margin: 28px 0 0; max-width: 540px; color: #5e5e5e; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.primary-button, .secondary-button { border-radius: 999px; padding: 13px 20px; border: 1px solid #111; cursor: pointer; font-size: 13px; font-weight: 600; transition: transform .2s, background .2s, color .2s; }
.primary-button { color: #fff; background: #111; }
.secondary-button { background: #fff; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button:hover { background: #f3f3f3; }
.primary-button.full { width: 100%; border-radius: 12px; margin-top: 6px; }
.hero-object { aspect-ratio: 1; max-width: 500px; justify-self: end; width: 100%; border-radius: 34px; background: #111; position: relative; overflow: hidden; box-shadow: 0 28px 70px rgba(0,0,0,.16); }
.hero-object::before, .hero-object::after { content: ""; position: absolute; inset: 16%; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; animation: orbit 11s linear infinite; }
.hero-object::after { inset: 27% 11%; transform: rotate(64deg); animation-direction: reverse; animation-duration: 8s; }
.hero-orb { position: absolute; width: 31%; aspect-ratio: 1; border-radius: 50%; background: #fff; left: 34.5%; top: 34.5%; box-shadow: 0 0 70px rgba(255,255,255,.45); }
.hero-orb::after { content: "いでよ"; position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(12px,1.4vw,18px); font-weight: 700; letter-spacing: .08em; }
@keyframes orbit { to { transform: rotate(360deg); } }

.content-section { padding: 62px 0 18px; }
.section-head { width: var(--page); margin: 0 auto 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -.055em; line-height: 1.2; }
.section-head p { margin: 7px 0 0; color: #777; font-size: 13px; }
.rail-controls { display: flex; gap: 8px; }
.rail-button, .icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.rail-button:disabled { opacity: .3; cursor: default; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 25vw); gap: 12px; overflow-x: auto; padding: 0 max(24px, calc((100vw - min(1440px, calc(100vw - 48px))) / 2)) 22px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-inline: 24px; }
.rail::-webkit-scrollbar { display: none; }
.property-card, .gallery-card { scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; position: relative; }
.property-card { aspect-ratio: 1.5; padding: 22px; background: var(--soft); border: 1px solid #ececea; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.property-card:hover { transform: translateY(-5px); box-shadow: 0 16px 35px rgba(0,0,0,.09); }
.property-card.tone-ink { color: #fff; background: #111; border-color: #111; }
.property-eyebrow { font-size: 9px; letter-spacing: .14em; opacity: .62; }
.property-icon { position: absolute; width: 100px; height: 100px; right: 18px; top: 18px; opacity: .9; }
.property-icon svg { width: 100%; height: 100%; }
.property-card h3 { font-size: 22px; letter-spacing: -.045em; margin: 0 0 7px; }
.property-card p { margin: 0; max-width: 82%; font-size: 12px; line-height: 1.65; opacity: .66; }
.card-arrow { position: absolute; right: 20px; bottom: 20px; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.gallery-shelf { padding: 38px 0 8px; }
.gallery-shelf:first-child { padding-top: 16px; }
.gallery-card { background: #fff; color: #111; min-width: 0; border: 1px solid var(--line); display: block; transition: transform .2s; }
.gallery-card:hover { transform: translateY(-4px); }
.gallery-card:focus-visible { outline: 2px solid #111; outline-offset: 4px; }
.gallery-image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #111; }
.gallery-copy { padding: 16px; }
.gallery-copy h3 { margin: 0; font-size: 18px; }
.gallery-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11px; color: #666; }
.hero-artwork::before, .hero-artwork::after { display: none; }
.hero-object.hero-artwork { aspect-ratio: 1; }
.hero-artwork img, .artwork-image img { display: block; width: 100%; height: auto; }
.artwork-image { min-width: 0; border-radius: 28px; overflow: hidden; background: #111; }
.artwork-facts { margin: 24px 0; }
.artwork-facts > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.artwork-facts dt { color: #777; font-size: 12px; }
.artwork-facts dd { margin: 0; overflow-wrap: anywhere; }
.image-link { display: inline-flex; margin: 8px 0; }
.prompt-actions { flex-wrap: wrap; }

.page-shell { width: var(--page); margin: 0 auto; padding: 60px 0 100px; }
.detail-back { display: inline-flex; align-items: center; gap: 8px; color: #666; font-size: 13px; margin-bottom: 30px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr); gap: clamp(40px,6vw,96px); align-items: start; }
.detail-visual { aspect-ratio: 1.15; border-radius: 28px; background: #111; position: relative; overflow: hidden; }
.detail-visual .property-icon { width: 46%; height: 46%; inset: 27%; color: #fff; }
.detail-copy .kicker { margin-top: 8px; }
.detail-copy h1 { margin: 0; font-size: clamp(38px,5vw,68px); line-height: 1.08; letter-spacing: -.065em; }
.detail-copy > p { color: #666; font-size: 15px; line-height: 1.9; margin: 24px 0 32px; }
.prompt-box { border: 1px solid #ddd; border-radius: 16px; padding: 18px; background: #fafafa; }
.prompt-box code { display: block; white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.8; }
.prompt-actions { display: flex; gap: 10px; margin-top: 15px; }
.howto { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 25px; }
.howto h2 { font-size: 16px; margin: 0 0 15px; }
.steps { display: grid; gap: 10px; counter-reset: step; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: #555; line-height: 1.6; font-size: 13px; }
.step::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #bbb; border-radius: 50%; color: #111; font-size: 10px; }

.skeleton { background: linear-gradient(90deg,#eeeeeb 25%,#f7f7f5 38%,#eeeeeb 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 16px; }
.skeleton-page { width: var(--page); margin: 0 auto; padding: 60px 0; }
.skeleton-hero { height: 360px; margin-bottom: 64px; }
.skeleton-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.skeleton-card { aspect-ratio: 1.5; }
@keyframes shimmer { to { background-position: -100% 0; } }

.submit-dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.submit-dialog::backdrop { background: rgba(0,0,0,.54); backdrop-filter: blur(4px); }
.auth-dialog { width: min(430px, calc(100vw - 32px)); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.auth-dialog::backdrop { background: rgba(0,0,0,.54); backdrop-filter: blur(4px); }
.auth-panel { padding: 38px; text-align: center; position: relative; }
.auth-close { position: absolute; right: 18px; top: 18px; }
.auth-mark { display: inline-grid; margin: 0 auto 28px; transform: scale(1.4); }
.auth-panel h2 { margin: 0; font-size: 28px; letter-spacing: -.05em; }
.auth-panel > p:not(.kicker) { color: #666; font-size: 12px; line-height: 1.8; margin: 14px auto 24px; max-width: 310px; }
#google-signin { min-height: 44px; display: flex; justify-content: center; }
.auth-status { min-height: 20px; color: #666; font-size: 11px; margin-top: 14px; }
.submit-dialog form { padding: 30px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.dialog-head h2 { margin: 0; font-size: 27px; letter-spacing: -.045em; }
.dialog-copy { color: #666; font-size: 13px; line-height: 1.7; margin: 14px 0 24px; }
.submit-dialog label { display: grid; gap: 7px; font-size: 11px; font-weight: 600; margin-bottom: 16px; }
.submit-dialog input, .submit-dialog select, .submit-dialog textarea { width: 100%; border: 1px solid #d8d8d8; border-radius: 10px; background: #fff; padding: 12px; outline: none; }
.submit-dialog input:focus, .submit-dialog select:focus, .submit-dialog textarea:focus { border-color: #111; box-shadow: 0 0 0 3px #0001; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note, .form-status { font-size: 10px; line-height: 1.6; color: #777; margin: -3px 0 14px; }
.form-status { min-height: 16px; color: #111; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%,20px); padding: 11px 16px; border-radius: 999px; background: #111; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.empty { width: var(--page); margin: 30px auto; color: #777; }
.site-footer { width: var(--page); margin: 90px auto 0; padding: 28px 0 50px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #777; font-size: 11px; }
.site-footer a { color: inherit; }
.legal-page { max-width: 760px; }
.legal-page h1 { font-size: clamp(38px, 6vw, 64px); margin: 16px 0 42px; letter-spacing: -.055em; }
.legal-page h2 { margin: 34px 0 10px; font-size: 20px; }
.legal-page p { color: #555; line-height: 1.95; }
.legal-page .legal-date { margin-top: 48px; color: #888; font-size: 12px; }

@media (max-width: 960px) {
  :root { --page: calc(100vw - 36px); }
  .hero { grid-template-columns: 1fr .72fr; gap: 32px; min-height: 440px; }
  .rail { grid-auto-columns: minmax(260px, 38vw); padding-inline: 18px; }
  .detail-grid { grid-template-columns: 1fr 1fr; gap: 35px; }
}

@media (max-width: 700px) {
  :root { --page: calc(100vw - 28px); }
  .site-header { height: 66px; grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .header-action { font-size: 0; width: 38px; height: 38px; padding: 0; }
  .header-action::before { content: "+"; font-size: 20px; }
  .login-button { max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero { grid-template-columns: 1fr; padding: 54px 0 30px; gap: 38px; }
  .hero h1 { font-size: clamp(48px,16vw,72px); }
  .hero-object { justify-self: stretch; max-width: none; aspect-ratio: 1.2; }
  .section-head { align-items: center; }
  .section-head p { display: none; }
  .rail { grid-auto-columns: 82vw; gap: 10px; padding-inline: 14px; }
  .content-section { padding-top: 48px; }
  .gallery-shelf { padding-top: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-visual { aspect-ratio: 1.25; }
  .detail-copy h1 { font-size: 44px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .submit-dialog form { padding: 22px; }
  .skeleton-row { grid-template-columns: 1fr; }
  .skeleton-row > :not(:first-child) { display: none; }
  .site-footer { margin-top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
