/* The shared parts of the EC制作事業 pages, /ec-creative (ECサイト) and /ec-creative/gallery (AIクリエイティブ).
   Each part is made here once and used by both pages (2026-11-14 owner: 同じ役割の部品は、ページが違っても同じ作りに;
   「今後のスケールや保守にも耐えうるようにリファクタリングした方がいいかもね」):
     1. header   2. the switch bar at the bottom   3. footer   4. the consultation form
   Two tones: data-tone="light" on the EC page, "night" on the portfolio. Where the two pages still differ in a
   detail, the difference is written as that tone's value, so it is visible in one place and nothing changed on screen
   when the parts were brought together (2026-11-14 refactor: the owner asked for no change to design, behaviour or speed).
   Page-only styling stays with each page: page.css and its component files for /ec-creative, gallery.css for the
   portfolio. Scripts: ec-shared.js. */

/* ------------------------------------------------------------------------------------------------------------
   1. Header
   ------------------------------------------------------------------------------------------------------------ */
/* The header of the EC制作事業 pages, one implementation for /ec-creative and /ec-creative/gallery
   (2026-11-14 owner: 「ヘッダーはどちらのタブでも共通でいいよ。そして、実績ボタンを無くして『相談する』だけにしよう。
   ヘッダー自体の高さは少しだけ抑えてコンパクトにしたい」).
   The floating frost capsule first made for the EC page (10/23 owner: 斜体＋浮かぶフロストヘッダー), now 60px high
   (was 72) on desktop and 54px (was 64) on phones, with the wordmark and one black consult button.
   Both pages hide it while scrolling down and bring it back on the way up (page.js / gallery.js toggle .is-hidden). */
.site-header {
  position: fixed;
  z-index: 50;
  inset: 14px 24px auto;
  max-width: 720px;
  margin-inline: auto;
  min-height: 60px;
  padding: 8px 8px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  isolation: isolate;
  border: 0;
  border-radius: 21px;
  color: #1d2328;
  background: linear-gradient(115deg, #ffffffa8, #ffffff68 52%, #ffffff91);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  backdrop-filter: blur(32px) saturate(1.2);
  box-shadow: 0 10px 32px #162b3b16;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s,
    background-color 0.25s;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath d='M0 0h128v128H0z' filter='url(%23grain)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.21;
  mix-blend-mode: multiply;
}
.site-header.is-reading {
  background-color: #ffffff4d;
}
.site-header.is-hidden {
  transform: translateY(calc(-100% - 24px - env(safe-area-inset-top)));
  opacity: 0;
  pointer-events: none;
}
.site-header .brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  width: 132px;
  min-height: 44px;
  margin-right: auto;
  padding-block: 4px;
}
/* Native image styling must never round off the wordmark's outer strokes. */
.site-header .brand img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  filter: none;
}
.site-header a.header-consult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: #141515;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease;
}
@media (hover: hover) {
  .site-header a.header-consult:hover {
    background: #2c2f2f;
    color: #fff;
  }
}
.site-header a.header-consult:focus-visible {
  outline: 2px solid #556274;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-header {
    inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) auto
      max(12px, env(safe-area-inset-left));
    min-height: 54px;
    padding: 6px 6px 6px 14px;
    gap: 12px;
    border-radius: 18px;
  }
  .site-header .brand {
    width: 104px;
    min-width: 0;
    min-height: 40px;
  }
  .site-header a.header-consult {
    min-height: 42px;
    padding: 0 18px;
    font-size: 13px;
  }
}
@media (max-width: 359px) {
  .site-header {
    padding-left: 12px;
    gap: 8px;
  }
  .site-header .brand {
    width: 90px;
  }
  .site-header a.header-consult {
    padding: 0 14px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .site-header.is-reading {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .site-header::before {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* The switch between ECサイト and AIクリエイティブ in the header, on wide screens (from 1001px). Owner 2026-11-16:
   「① デスクトップは、ヘッダーの真ん中に切り替えを置き、ヘッダーを隠さず常に出す」「言語切り替えや相談ボタンとは差別化した方が
   いい」, then look B of the four shown (「Bですぐ公開して」): a quiet recess with the current page raised as a white
   segment, apart from the language switch (a black pill) and the consult button (black). The header widens from
   720px to 980px and stays while scrolling (page.js / gallery.js); below 1001px the bar at the bottom does the work.
   The white segment slides to the other page as the bottom bar's pill does (cross-document view transitions,
   Modern Web Guidance: cross-document-transitions; where unsupported the page simply changes). */
.header-switch {
  display: none;
}
@media (min-width: 1001px) {
  .site-header {
    max-width: 980px;
    gap: 16px;
  }
  .site-header .brand {
    margin-right: 0;
  }
  .site-header .header-switch {
    display: grid;
    grid-template-columns: auto auto;
    margin-inline: auto;
    padding: 4px;
    isolation: isolate;
    border-radius: 14px;
    background: #00000009;
    box-shadow: inset 0 1px 2px #0000000f;
  }
  /* belt and braces: the scripts no longer hide the header here, and if a class is left, it is not obeyed */
  .site-header.is-hidden {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}
.header-switch-thumb {
  grid-row: 1;
  grid-column: 1;
  z-index: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 1px 2px #0000001a,
    0 4px 12px #0000000d;
  view-transition-name: header-switch-thumb;
}
.header-switch[data-current="ai"] .header-switch-thumb {
  grid-column: 2;
}
.header-switch a {
  position: relative;
  z-index: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  border-radius: 10px;
  color: #3f454b;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.3s ease;
}
.header-switch a:first-of-type {
  grid-column: 1;
}
.header-switch a:last-of-type {
  grid-column: 2;
}
.header-switch a[aria-current="page"] {
  color: #141515;
}
.header-switch a:not([aria-current]):active {
  background: rgba(20, 21, 21, 0.07);
  color: #141515;
}
@media (hover: hover) {
  .header-switch a:not([aria-current]):hover {
    background: rgba(20, 21, 21, 0.045);
    color: #141515;
  }
}
.header-switch a:focus-visible {
  outline: 2px solid #556274;
  outline-offset: 1px;
}
.header-switch-label-ec {
  view-transition-name: header-switch-ec;
}
.header-switch-label-ai {
  view-transition-name: header-switch-ai;
}
/* the segment is drawn by its group, so its corners and shadow never stretch while it slides */
::view-transition-group(header-switch-thumb) {
  background: #fff;
  border-radius: 10px;
  box-shadow:
    0 1px 2px #0000001a,
    0 4px 12px #0000000d;
  animation-duration: 0.44s;
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.2, 1);
}
::view-transition-old(header-switch-thumb),
::view-transition-new(header-switch-thumb) {
  display: none;
}
::view-transition-old(header-switch-ec),
::view-transition-new(header-switch-ec),
::view-transition-old(header-switch-ai),
::view-transition-new(header-switch-ai) {
  animation-duration: 0.44s;
}
@media (prefers-reduced-motion: reduce) {
  .header-switch a {
    transition: none;
  }
}
@media (forced-colors: active) {
  .header-switch-thumb {
    background: Highlight;
  }
  .header-switch a[aria-current="page"] {
    color: HighlightText;
  }
}

/* ------------------------------------------------------------------------------------------------------------
   2. The switch bar at the bottom (ECサイト | AIクリエイティブ)
   ------------------------------------------------------------------------------------------------------------ */
/* The switch between ECサイト and AIクリエイティブ: a small bar floating at the bottom of the screen (2026-11-14, owner).
   Used by /ec-creative and /ec-creative/gallery.
   - Layout from GlassKit 1.19.1 by Jungherz GmbH, MIT (https://github.com/JUNGHERZ/GlassKit; licence text in
     licenses/glasskit-LICENSE.txt): the floating tab bar (pill, fixed at the bottom centre) and the segmented
     control (a 3px track, the current item raised as a pill).
   - Surface: the EC page's floating frost header, exactly (page.css .site-header: white gradient, 32px blur,
     the same grain), and the current page in the black of the consult buttons. Owner: 「ヘッダーと同じフロストと
     黒のコントラストの方がモダンに見えるかも。そっちに切り替えて」 (the Liquid Glass highlights were dropped).
   - The current pill slides between the two pages (cross-document view transitions: Safari 18.2+, Chrome 126+;
     elsewhere the page simply changes). */
nav.page-switch {
  position: fixed;
  left: 50%;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 45;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 2px;
  padding: 3px;
  isolation: isolate;
  border-radius: 999px;
  background: linear-gradient(115deg, #ffffffa8, #ffffff68 52%, #ffffff91);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  backdrop-filter: blur(32px) saturate(1.2);
  box-shadow: 0 10px 32px #162b3b16;
  transform: translate3d(-50%, 0, 0);
  transition:
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.3s ease;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  view-transition-name: page-switch;
}
/* the header's grain */
nav.page-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath d='M0 0h128v128H0z' filter='url(%23grain)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.21;
  mix-blend-mode: multiply;
}
/* It stays while scrolling (2026-11-16 owner: 「下にスクロールしてる時って、ポートフォリオに切り替えるフローティングバー
   表示されないんだね これ不便だな」) and steps aside only over the footer and while a form field is being typed in
   (ec-shared.js): the keyboard is up and the bar would sit on the form. */
nav.page-switch.is-typing,
nav.page-switch.is-at-footer {
  transform: translate3d(-50%, calc(100% + 36px), 0);
  opacity: 0;
  pointer-events: none;
}

.page-switch-thumb {
  grid-row: 1;
  grid-column: 1;
  z-index: 0;
  border-radius: 999px;
  background: #141515;
  view-transition-name: page-switch-thumb;
}
nav.page-switch[data-current="ai"] .page-switch-thumb {
  grid-column: 2;
}

nav.page-switch a {
  position: relative;
  z-index: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  color: rgba(29, 35, 40, 0.62);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.25s ease,
    color 0.3s ease;
}
nav.page-switch a:first-of-type {
  grid-column: 1;
}
nav.page-switch a:last-of-type {
  grid-column: 2;
}
nav.page-switch a[aria-current="page"] {
  color: #fff;
}
nav.page-switch a:not([aria-current]):active {
  background: rgba(20, 21, 21, 0.08);
  color: #141515;
}
@media (hover: hover) {
  nav.page-switch a:not([aria-current]):hover {
    background: rgba(20, 21, 21, 0.06);
    color: #141515;
  }
}
nav.page-switch a:focus-visible {
  outline: 2px solid #556274;
  outline-offset: 1px;
}
.page-switch-label {
  display: inline-block;
  transform: translateY(0.02em);
}
.page-switch-label-ec {
  view-transition-name: page-switch-ec;
}
.page-switch-label-ai {
  view-transition-name: page-switch-ai;
}

/* Switching pages: the bar stays, the page crossfades, the black pill slides to the other side */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.36s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* The pill is drawn by its group, so its rounded ends never stretch while it slides */
::view-transition-group(page-switch-thumb) {
  background: #141515;
  border-radius: 999px;
  animation-duration: 0.44s;
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.2, 1);
}
::view-transition-old(page-switch-thumb),
::view-transition-new(page-switch-thumb) {
  display: none;
}
::view-transition-old(page-switch-ec),
::view-transition-new(page-switch-ec),
::view-transition-old(page-switch-ai),
::view-transition-new(page-switch-ai) {
  animation-duration: 0.44s;
}
/* The language switch is one quick cross-fade of the whole page (site-shared.css): the parts that move on their own
   here stay out of it (Safari drew such parts inside the frosted bars as nothing for a moment), and the header keeps
   its look while the other language's page arrives (owner 2026-11-17: 「言語切り替えの瞬間、一瞬ヘッダーが薄まって、背景が
   強く透過する」). site-shared.js marks the page being left (.lang-swap); the inline script in each head marks the page
   arriving (.lang-arrival, until the reader first touches, scrolls or presses a key). */
:is(.lang-swap, .lang-arrival)
  :is(
    nav.page-switch,
    .page-switch-thumb,
    .page-switch-label-ec,
    .page-switch-label-ai,
    .header-switch-thumb,
    .header-switch-label-ec,
    .header-switch-label-ai
  ) {
  view-transition-name: none;
}
.lang-arrival .site-header {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  nav.page-switch,
  nav.page-switch a {
    transition: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  nav.page-switch {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  nav.page-switch::before {
    display: none;
  }
}
@media print {
  nav.page-switch {
    display: none;
  }
}
/* from 1001px the switch is in the header (section 1) */
@media (min-width: 1001px) {
  nav.page-switch {
    display: none;
  }
}

/* ------------------------------------------------------------------------------------------------------------
   3. Footer: the wordmark, 「コーポレートサイトへ」, the three policies and the copyright, one layout for every page but the Top
   (also the policy pages, data-tone="paper"; 2026-11-14 owner: 「全く同じデザインでいいのに、わざわざ違うのは違和感ある。ロゴのサイズとか配置とか、
   別にECの方と同じ実装を流用すればいいじゃん」). data-tone="light" on /ec-creative, "night" on the portfolio.
    The button behaves the same in every tone: the EC page's, from the Web Awesome filled neutral button it used to
    be (hover and press colours, the slight press, the 75ms fades, the blue focus ring); each tone sets only its
    colours (2026-11-14 owner: 細かな違いは「揃える」). Its label never wraps (owner: 2行になるのは「許せない」).
   ------------------------------------------------------------------------------------------------------------ */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 40px;
  padding: 32px clamp(24px, 3.3vw, 64px) 48px;
  color: var(--footer-text);
  background: var(--footer-surface);
}
.site-footer[data-tone="light"] {
  --footer-surface: #e7ecf2;
  --footer-text: #192024;
  --footer-quiet: #4b565c;
  --footer-button: #e4e5e9;
  --footer-button-text: #424554;
  --footer-button-hover: color-mix(in oklab, var(--footer-button), oklch(from currentColor calc(1 - l) c h) 10%);
  --footer-button-press: color-mix(in oklab, var(--footer-button), white 10%);
}
/* paper: the policy pages, on the Top's paper (2026-11-14) */
.site-footer[data-tone="paper"] {
  --footer-surface: #e4e9df;
  --footer-text: #213b3b;
  --footer-quiet: #526260;
  --footer-button: #ffffffb3;
  --footer-button-text: #213b3b;
  --footer-button-hover: #fff;
  --footer-button-press: #fff;
}
.site-footer[data-tone="night"] {
  --footer-surface: var(--night, #0b0c0c);
  --footer-text: #eef0ec;
  --footer-quiet: #9aa3a0;
  --footer-button: #ffffff17;
  --footer-button-text: #eef0ec;
  --footer-button-hover: #ffffff26;
  --footer-button-press: #ffffff33;
}
.site-footer .footer-brand {
  display: block;
  flex: 0 0 auto;
  width: 190px;
  margin-right: auto;
}
.site-footer .footer-brand img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
.site-footer[data-tone="night"] .footer-brand img {
  filter: brightness(0) invert(1);
}
.site-footer .footer-corporate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--footer-button-text);
  background-color: var(--footer-button);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition-property: background, border, box-shadow, color;
  transition-duration: 75ms;
  transition-timing-function: ease;
}
/* Web Awesome's filled button takes its hover colour on touch screens too (no hover media query) */
.site-footer .footer-corporate:hover {
  background-color: var(--footer-button-hover);
}
.site-footer .footer-corporate:active {
  background-color: var(--footer-button-press);
  transform: scale(0.9875);
}
.site-footer .footer-corporate:focus {
  outline: none;
}
.site-footer .footer-corporate:focus-visible {
  outline: solid 3px #2d5ad8;
  outline-offset: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-corporate:hover,
  .site-footer .footer-corporate:active {
    transform: none;
  }
}
/* Second line: the three policies (2026-11-14) and the copyright */
.site-footer .footer-meta {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
}
.site-footer .footer-policies {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 11px;
  line-height: 1.8;
}
.site-footer .footer-policies a {
  color: var(--footer-quiet);
  text-decoration: none;
}
@media (hover: hover) {
  .site-footer .footer-policies a:hover {
    color: var(--footer-text);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
.site-footer .footer-policies a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}
.site-footer small {
  font-size: 11px;
  line-height: 1.8;
  color: var(--footer-quiet);
}
@media (max-width: 760px) {
  .site-footer {
    flex-wrap: wrap;
    gap: 20px 28px;
    padding: 32px 24px max(32px, env(safe-area-inset-bottom));
  }
  .site-footer .footer-brand {
    width: 160px;
  }
  .site-footer .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .site-footer .footer-policies {
    flex-direction: column;
    gap: 2px;
  }
}

/* ------------------------------------------------------------------------------------------------------------
   4. The consultation form: the same labels, sizes, order and button on both pages (2026-11-14 owner:
   「フォームも送信のボタンの文言とか揃ってないの謎だよね。そこは揃えようよ。フォームのデザインとかも」).
   The panel around the form belongs to each page (page.css .contact .contact-form, gallery.css .contact-panel).
   light (data-tone="light", the EC page): the fields, the select and the button are also drawn by the Web Awesome
   controls that page loads (experience/ui.css: borders, focus ring, hover and press colours, fades); only the
   page's own values are set here. night (the portfolio): every value is set here.
    The small differences the two pages had (label line, the space at the top of the text box, the message after
    sending, the field and button fades, the dimming while sending, the button's focus ring and press) now follow the
    EC page on both (2026-11-14 owner: 「揃える」). What stays per tone: colours, and the portfolio's own field border
    and focus glow on the night photograph.
   ------------------------------------------------------------------------------------------------------------ */
.contact-form {
  display: grid;
  gap: 18px;
}
.contact-form h3 {
  margin: 0;
  font: 500 24px/1.5 var(--font);
  letter-spacing: -0.025em;
}
.contact-form h3:focus {
  outline: none;
}
.contact-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-form label {
  display: grid;
  gap: 9px;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--form-label);
}
.contact-form label > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--form-quiet);
}
.contact-form label > :is(input, select, textarea) {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  color: var(--form-value);
  background-color: var(--form-field);
}
.contact-form textarea {
  min-height: 168px;
  padding-block: calc(0.75em - ((1lh - 1em) / 2));
  resize: vertical;
}
.contact-form textarea::placeholder {
  color: var(--form-placeholder);
  opacity: 1;
}
.contact-form .form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .form-notice {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--form-note);
}
.contact-form .form-status {
  margin: 0;
  min-height: 0;
  font-size: 15px;
  line-height: 1.7;
}
.contact-form .form-status:empty {
  display: none;
}
.contact-form .form-status[data-state="error"] {
  color: var(--form-error);
}
.contact-form .form-status[data-state="success"] {
  color: var(--form-success);
}
.contact-form .form-submit {
  width: 100%;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .contact-form {
    gap: 24px;
  }
  .contact-form .form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-form textarea {
    min-height: 200px;
  }
}

/* light: the EC page */
.contact-form[data-tone="light"] {
  --form-label: #202224;
  --form-quiet: #626970;
  --form-value: #202224;
  --form-field: #fff;
  --form-placeholder: #6b7177;
  --form-note: #4b565c;
  --form-error: #ad2323;
  --form-success: #166039;
}
.contact-form[data-tone="light"] label > :is(input, select, textarea) {
  font-family: var(--font);
}
.contact-form[data-tone="light"] :is(input, select, textarea) {
  scroll-margin-block: 96px 24px;
}
.contact-form[data-tone="light"] textarea {
  line-height: 1.8;
}
/* Web Awesome's button with the page's size (page.css .wa-button, before the form had its own class) */
.contact-form[data-tone="light"] .form-submit {
  min-height: var(--wa-form-control-height);
  height: auto;
  padding-block: 12px;
}
.no-js .contact-form[data-tone="light"] [data-submit] {
  display: none;
}

/* night: the portfolio */
.contact-form[data-tone="night"] {
  --form-label: #eef0ec;
  --form-quiet: #eef0ec99;
  --form-value: #f4f3ef;
  --form-field: #ffffff0f;
  --form-placeholder: #eef0ec57;
  --form-note: #eef0ec8c;
  --form-error: #f0b7ad;
  --form-success: #d6e5da;
}
.contact-form[data-tone="night"] :is(input, textarea) {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--form-value);
  background-color: var(--form-field);
  border: 1px solid #ffffff47;
  border-radius: 10px;
  font:
    16px/1.8 Gallery Sans,
    "Hiragino Kaku Gothic ProN",
    sans-serif;
  padding-inline: 18px;
  outline: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    outline-color 75ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form[data-tone="night"] input {
  height: 48px;
  padding-block: 0;
}
.contact-form[data-tone="night"] ::placeholder {
  color: var(--form-placeholder);
  opacity: 1;
}
.contact-form[data-tone="night"] :is(input, textarea):focus-visible {
  border-color: #ffffffb3;
  background: #ffffff17;
}
/* The light form (the EC page): with focus rings for keyboard users only (site-shared.css, 2026-11-16), the field's own
   border darkens to show where the words go; no extra line around it. */
.contact-form:not([data-tone="night"]) :is(input, select, textarea):focus {
  border-color: #3a4047;
}
.contact-form[data-tone="night"] .form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #f2f0ec;
  color: #141515;
  font-size: 16px;
  font-weight: 500;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition-property: background, border, box-shadow, color;
  transition-duration: 75ms;
  transition-timing-function: ease;
}
@media (hover: hover) {
  .contact-form[data-tone="night"] .form-submit:not(:disabled):hover {
    background: #fff;
  }
}
.contact-form[data-tone="night"] .form-submit:not(:disabled):active {
  background: #fff;
  transform: scale(0.9875);
}
.contact-form[data-tone="night"] .form-submit:focus {
  outline: none;
}
/* D8 (2026-11-15): a light ring on the night photograph, around the button's own corners */
.contact-form[data-tone="night"] .form-submit:focus-visible {
  outline: 2px solid #eef0ec;
  outline-offset: 3px;
}
.contact-form[data-tone="night"] .form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  .contact-form[data-tone="night"] .form-submit:hover,
  .contact-form[data-tone="night"] .form-submit:active {
    transform: none;
  }
}
