/* Direct consultation, next to each artwork and inside the museum. */
.contact-quick-start[hidden] { display: none; }
.work-direct-inquiry {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; width: fit-content; max-width: calc(100% - 32px);
  margin: 16px auto 0; padding: 10px 22px;
  border: 1px solid rgba(120,247,232,.5); border-radius: 999px;
  color: var(--neo-tiffany); background: rgba(120,247,232,.04);
  font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.work-direct-inquiry:hover { background: rgba(120,247,232,.12); border-color: var(--neo-tiffany); }
.work-direct-inquiry:focus-visible, .work-thumb:focus-visible {
  outline: 2px solid var(--neo-tiffany); outline-offset: 5px;
}
.work-card--case .work-thumb { grid-row: span 2; }
.work-card--case .work-direct-inquiry { grid-column: 2; margin: 0 34px 28px; }
.work-inquiry-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0 0 16px; text-align: left; }
.work-inquiry-options label { display: block; min-width: 0; color: var(--neo-silver); font-size: .72rem; line-height: 1.5; }
.work-inquiry-options select {
  width: 100%; min-height: 44px; margin-top: 7px; padding: 8px;
  border: 1px solid rgba(120,247,232,.32); border-radius: 6px;
  color: var(--neo-silver-bright); background: #101718; color-scheme: dark;
  font-family: inherit; font-size: .78rem; text-overflow: ellipsis;
}
.work-inquiry-options select:focus-visible { outline: 2px solid var(--neo-tiffany); outline-offset: 2px; }
@media (max-width: 760px) {
  #contactFormPanel { padding: 24px 18px !important; }
  .contact-work-reference { flex-direction: row; gap: 14px; align-items: flex-start; padding-block: 12px; text-align: left; }
  .contact-work-reference img { width: 64px; height: 64px; flex-basis: 64px; }
  .contact-work-reference p { font-size: .8rem; line-height: 1.7; }
  .contact-work-reference .contact-quick-start-kicker { font-size: .65rem; }
  .contact-work-reference h2 { font-size: 1.1rem; }
  .contact-work-reference a { font-size: .8rem; }
  .work-card--case .work-thumb { grid-row: auto; }
  .work-card--case .work-direct-inquiry { grid-column: 1 / -1; margin: 0 auto 28px; }
}
@media (max-width: 360px) { .work-inquiry-options { grid-template-columns: 1fr; } }

/* Compact inquiry summary: choose once, then write the message. */
#contactForm .contact-inquiry-summary {
  min-width: 0; margin: 0 0 28px; padding: 18px 20px 16px;
  border: 1px solid rgba(120,247,232,.27); border-radius: 12px;
  background: rgba(120,247,232,.025);
}
.contact-inquiry-summary legend { padding: 0 8px; color: var(--neo-gold-light); font-size: .9rem; font-weight: 600; }
.contact-inquiry-summary-grid { display: grid; grid-template-columns: 1.2fr 1.15fr 1fr; gap: 16px; align-items: start; }
.contact-inquiry-summary-grid .form-field { min-width: 0; margin: 0; gap: 6px; }
#contactForm .contact-inquiry-summary label { font-size: .8rem; margin: 0 0 6px; }
#contactForm .contact-inquiry-summary select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 30px 10px 10px; font-size: .86rem; text-overflow: ellipsis; }
.contact-reference-picker { display: flex; gap: 8px; align-items: center; min-width: 0; }
.contact-reference-picker img { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 4px; object-fit: contain; }
.contact-reference-picker img[hidden] { display: none; }
.contact-reference-picker select { flex: 1; }
#inquirySummaryHint { margin: 12px 0 0; color: var(--neo-silver); font-size: .76rem; line-height: 1.7; }
@media (max-width: 760px) {
  .contact-inquiry-summary-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  /* The label sits above its select so the choice gets the full width ("SNS運用・コンテンツ制作" was cut off beside it). */
  .contact-inquiry-summary-grid > .form-field:not(:first-child) { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  #contactForm .contact-inquiry-summary-grid > .form-field:not(:first-child) label { margin: 0; }
  .contact-inquiry-summary-grid > .form-field:first-child { grid-column: 1 / -1; }
  #contactForm .contact-inquiry-summary { padding: 14px 12px 12px; margin-bottom: 24px; }
  #contactForm .contact-inquiry-summary select { font-size: 1rem; }
}
/* Page title: the two phrases break only at the space between them, never inside one, with no separator mark.
   The title stays one text run so its gold gradient still paints every letter. */
.contact-title { word-break: keep-all; }

/* Choices drawn by the site (js/form-choices.js, 2026-11-03), since the phone's own picker cannot be styled. The selects
   stay in the form, out of sight; "用途" and "ご予算" are tiles with a cut corner that light up when chosen, and
   "参考作品" opens a panel of the site's own. With the tiles, the three fields stack at every width. */
#contactForm select.choice-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
#contactForm .contact-inquiry-summary-grid:has(.choice-tiles) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.contact-inquiry-summary-grid .form-field:has(.choice-tiles) { position: relative; }
.choice-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
/* Wider screens have room for wider tiles, so the longer labels keep to one or two whole lines. */
@media (min-width: 761px) { .choice-tiles { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); } }
.choice-tile { position: relative; display: block; min-width: 0; }
.choice-tile input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-tile span {
  --line: rgba(120, 247, 232, .28);
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 52px;
  padding: 10px 6px 10px 24px;
  border: 1px solid var(--line);
  /* The cut corner gets its own edge, so the outline runs all the way round. */
  background: linear-gradient(225deg, transparent 7.8px, var(--line) 7.8px, var(--line) 9.2px, transparent 9.2px), rgba(120, 247, 232, .03);
  color: rgba(232, 240, 239, .86);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.35;
  /* Japanese breaks between phrases where the browser can, not inside a word. */
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.choice-tile span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border: 1px solid rgba(120, 247, 232, .55);
  transform: rotate(45deg);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.choice-tile span::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 12px;
  height: 12px;
  border-left: 2px solid transparent;
  border-top: 2px solid transparent;
  transition: border-color .2s ease;
}
.choice-tile:hover span { --line: rgba(120, 247, 232, .5); color: #f4fffd; }
.choice-tile input:checked + span {
  --line: #78f7e8;
  background-color: rgba(120, 247, 232, .12);
  color: #f4fffd;
  box-shadow: inset 0 0 18px rgba(120, 247, 232, .14);
}
.choice-tile input:checked + span::before { background: #78f7e8; box-shadow: 0 0 10px rgba(120, 247, 232, .9); }
.choice-tile input:checked + span::after { border-color: var(--neo-gold-light); }
.choice-tile input:focus-visible + span { outline: 2px solid var(--neo-gold-light); outline-offset: 2px; }
.choice-tile input:active + span { transform: scale(.98); }
#contactForm .form-field:has(select.field-error) .choice-tile span { --line: var(--color-danger); }

.choice-picker { position: relative; flex: 1; min-width: 0; }
.choice-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(120, 247, 232, .28);
  border-radius: 12px;
  background: rgba(3, 7, 10, .9);
  color: #e8f0ef;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.choice-picker-button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-picker-button[data-empty] { color: rgba(232, 240, 239, .68); }
.choice-picker-button::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid #78f7e8;
  border-bottom: 2px solid #78f7e8;
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
.choice-picker-button:hover { border-color: rgba(120, 247, 232, .5); }
.choice-picker-button[aria-expanded="true"] { border-color: #78f7e8; box-shadow: 0 0 0 3px rgba(120, 247, 232, .12); }
.choice-picker-button[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(-135deg); }
.choice-picker-button:focus-visible { outline: 2px solid var(--neo-gold-light); outline-offset: 2px; }
.is-context-set .choice-picker-button { border-color: rgba(120, 247, 232, .48); }
.choice-panel {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: min(340px, 60vh);
  margin: 0;
  padding: 0 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid rgba(120, 247, 232, .55);
  border-radius: 14px;
  background: rgba(4, 9, 12, .98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(120, 247, 232, .14);
}
.choice-panel[hidden] { display: none; }
.choice-panel::before {
  content: attr(data-head);
  position: sticky;
  top: 0;
  display: block;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(120, 247, 232, .16);
  background: rgba(4, 9, 12, .98);
  color: rgba(120, 247, 232, .7);
  font-family: "Chakra Petch", "Noto Sans JP", sans-serif;
  font-size: .7rem;
  letter-spacing: .24em;
}
.choice-panel li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 16px;
  color: rgba(232, 240, 239, .86);
  font-size: .95rem;
  line-height: 1.4;
  cursor: pointer;
}
.choice-panel li b { flex: none; color: rgba(120, 247, 232, .55); font-family: "Chakra Petch", "Noto Sans JP", sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: .1em; }
.choice-panel li.is-active { background: rgba(120, 247, 232, .08); color: #f4fffd; }
.choice-panel li[aria-selected="true"] { color: #78f7e8; }
.choice-panel li[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: #78f7e8;
  box-shadow: 0 0 10px rgba(120, 247, 232, .9);
}
.choice-panel li[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: -3px 2px 0 auto;
  border-right: 2px solid var(--neo-gold-light);
  border-bottom: 2px solid var(--neo-gold-light);
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: reduce) {
  .choice-tile span, .choice-tile span::before, .choice-tile span::after, .choice-picker-button, .choice-picker-button::after { transition: none; }
}
/* On a phone the form panel's side padding shrinks, so from 375px two tiles fit side by side with their words whole;
   narrower phones get one column, as the tile grid allows no less than 128px. (The panel's padding is set inline,
   hence !important.) */
@media (max-width: 760px) {
  #contactFormPanel { padding-inline: 16px !important; }
}
