/*
 * base.css — reset + body scaffold + iPad touch optimization
 */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--ar-font-family-sans);
  font-size: 16px;
  color: var(--ar-color-text);
  background: var(--ar-color-bg);
  line-height: 1.5;
  min-height: 100vh;
  /* iPad sticky tap-highlight removed */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  /* nicer system font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.ar-page {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--ar-max-content-width);
  margin: 0 auto;
  padding: var(--ar-space-6) var(--ar-space-4) var(--ar-space-12);
  overflow-y: auto;
}

.ar-card {
  background: var(--ar-color-card);
  border-radius: var(--ar-radius);
  box-shadow: var(--ar-shadow-card);
  padding: var(--ar-space-5);
  border: 1px solid var(--ar-color-border);
}

.ar-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ar-space-2);
  background: var(--ar-color-accent);
  color: #FFFFFF;
  padding: var(--ar-space-3) var(--ar-space-6);
  border-radius: var(--ar-radius);
  font-weight: 600;
  font-size: 16px;
  min-height: 44px;
  transition: transform 120ms var(--ar-ease-out), opacity 120ms ease;
}
.ar-button-primary:active { transform: scale(0.98); opacity: 0.92; }
.ar-button-primary:disabled { background: var(--ar-color-text-dim); cursor: not-allowed; }

.ar-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ar-color-accent);
  border: 1px solid var(--ar-color-accent);
  padding: var(--ar-space-3) var(--ar-space-6);
  border-radius: var(--ar-radius);
  font-weight: 600;
  font-size: 16px;
  min-height: 44px;
}
.ar-button-secondary:active { opacity: 0.85; }

.ar-button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ar-color-text-muted);
  padding: var(--ar-space-2) var(--ar-space-4);
  border-radius: var(--ar-radius-sm);
  font-size: 14px;
  min-height: 36px;
}
.ar-button-ghost:hover { background: var(--ar-color-card-alt); }

.ar-stack-3 > * + * { margin-top: var(--ar-space-3); }
.ar-stack-4 > * + * { margin-top: var(--ar-space-4); }
.ar-stack-5 > * + * { margin-top: var(--ar-space-5); }
.ar-stack-6 > * + * { margin-top: var(--ar-space-6); }

.ar-muted { color: var(--ar-color-text-muted); }
.ar-meta { color: var(--ar-color-text-muted); font-size: var(--ar-font-size-meta); }
