.contact-compose {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 28px;
  overflow-y: auto;
  border: 1px solid rgba(210, 196, 255, .3);
  border-radius: 18px;
  color: var(--ink);
  background: #171124;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
.contact-compose::backdrop { background: rgba(5, 3, 12, .72); backdrop-filter: blur(8px); }
.contact-compose[open] { animation: contactComposeIn 240ms cubic-bezier(.2,.8,.2,1) both; }
.contact-compose[open]::backdrop { animation: contactBackdropIn 240ms ease both; }
@keyframes contactComposeIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes contactBackdropIn { from { background-color: rgba(5,3,12,0); backdrop-filter: blur(0); } to { background-color: rgba(5,3,12,.72); backdrop-filter: blur(8px); } }
@media (prefers-reduced-motion: reduce) { .contact-compose[open], .contact-compose[open]::backdrop { animation: none; } }
.contact-compose-active { overflow: hidden; }
.contact-compose h2 { margin: 0 40px 10px 0; font-size: 1.7rem; }
.contact-compose .eyebrow { margin-bottom: 8px; }
.contact-compose-intro, .contact-compose-note { color: var(--muted); line-height: 1.7; }
.contact-compose-intro { margin-bottom: 22px; font-size: .9rem; }
.contact-compose-close { position: absolute; top: 16px; right: 18px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 26px; cursor: pointer; }
.contact-compose-form { display: grid; gap: 16px; }
.contact-compose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-compose-form label { display: grid; gap: 8px; font-size: .9rem; min-width: 0; }
.contact-compose-form input, .contact-compose-form select, .contact-compose-form textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid rgba(210, 196, 255, .25); border-radius: 8px; background: #0e0a18; color: var(--ink); font: inherit; }
.contact-compose-form textarea { resize: vertical; min-height: 120px; }
.contact-compose-form select { appearance: none; padding-right: 40px; line-height: 1.5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23e5dcf5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; }
.contact-compose-form :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.contact-compose-note { margin: 0; font-size: .8rem; }
.contact-compose-note > span { display: block; margin-top: .35em; word-break: normal; overflow-wrap: break-word; line-break: strict; }
.contact-compose-email { white-space: nowrap; }
.contact-compose-form select[hidden] { display: none; }
.contact-select { position: relative; min-width: 0; }
.contact-select-toggle { width: 100%; min-height: 46px; padding: 11px 40px 11px 12px; border: 1px solid rgba(210,196,255,.25); border-radius: 8px; background: #0e0a18; color: var(--ink); font: inherit; line-height: 1.5; text-align: left; cursor: pointer; }
.contact-select-toggle::after { content: ''; position: absolute; right: 16px; top: 18px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.contact-select-toggle[aria-expanded=true] { border-color: var(--gold); }
.contact-select-toggle[aria-invalid=true] { border-color: #ff9fae; }
.contact-select-options { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0; max-height: 240px; overflow-y: auto; padding: 5px; border: 1px solid rgba(210,196,255,.35); border-radius: 10px; background: #21182f; box-shadow: 0 14px 30px rgba(0,0,0,.45); scrollbar-width: thin; }
.contact-select-options[hidden] { display: none; }
.contact-select-options button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; font: inherit; line-height: 1.5; text-align: left; cursor: pointer; }
.contact-select-options button:hover, .contact-select-options button.is-active { background: rgba(151,132,255,.25); }
.contact-select-options button[aria-selected=true] { color: var(--gold); background: rgba(151,132,255,.18); }
.contact-compose-submit { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 18px; border: 1px solid rgba(151, 132, 255, .5); border-radius: 10px; background: rgba(151, 132, 255, .22); color: var(--ink); font: inherit; cursor: pointer; }
.contact-compose-draft { color: var(--gold); font-size: .85rem; }
@media (max-width: 480px) {
  .contact-compose { padding: 24px 18px; }
  .contact-compose-grid { grid-template-columns: minmax(0, 1fr); }
  /* iOS 不會在聚焦文字欄位時自動放大整個表單。 */
  .contact-compose-form input, .contact-compose-form textarea, .contact-select-toggle { font-size: 16px; }
}
