/* main.base.css — reset + 基礎元素（依 main.tokens.css） */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
h1 { font-size: var(--t-3xl); line-height: 1.2; font-weight: 700; }
h2 { font-size: var(--t-2xl); line-height: 1.25; font-weight: 700; }
h3 { font-size: var(--t-lg);  line-height: 1.4;  font-weight: 700; }

a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; color: inherit; }

/* 表單控制項（對齊 city-default-v1 template.css） */
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: .85rem 1rem;
  outline: none;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus {
  border-color: var(--rust);
  box-shadow: 0 0 0 3px var(--rust-ring);
}
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M0 0 L5 6 L10 0' stroke='%23b44b2c' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 12px;
}

:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
[hidden] { display: none !important; }

.main-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
