/* AI予定読み上げアシスタント STEP 1
   スマホでもPCでも、同じHTMLを画面幅に合わせて並べ替えます。 */

:root {
  --bg: #f3efe6;
  --surface: #fffdf9;
  --ink: #1e2430;
  --muted: #5e6878;
  --line: #e4dccf;
  --accent: #0e6b62;
  --accent-dark: #0b574f;
  --info-bg: #e5f4f1;
  --info-ink: #0d4f49;
  --error-bg: #fdecea;
  --error-ink: #8a2424;
  --shadow: 0 12px 30px rgba(48, 38, 22, 0.06);
  --radius: 18px;
  --max: 1080px;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: "Yu Gothic UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  line-height: 1.4;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
}

h2 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 0.8rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header {
  width: 100%;
  min-width: 0;
}

.site-header-inner,
.site-main,
.site-footer {
  width: 100%;
  max-width: var(--max);
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(1rem + env(safe-area-inset-left));
  padding-right: calc(1rem + env(safe-area-inset-right));
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: calc(0.85rem + env(safe-area-inset-top));
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  flex: 0 0 auto;
}

.brand-name {
  max-width: 12rem;
  line-height: 1.35;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.nav a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

.nav form {
  margin: 0;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.nav-button:hover {
  background: var(--info-bg);
}

.nav-email {
  display: inline-flex;
  align-items: center;
  max-width: 14rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-main {
  flex: 1;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}

.site-footer {
  padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.92rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.15rem 1.3rem;
  min-width: 0;
}

.auth-card {
  max-width: 34rem;
  margin: 0 auto;
}

.page-heading {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.greeting {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.lead,
.hint,
.subdate {
  color: var(--muted);
}

.notice,
.message {
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.notice,
.message.info {
  background: var(--info-bg);
  color: var(--info-ink);
}

.message.error {
  background: var(--error-bg);
  color: var(--error-ink);
}

.message ul {
  margin: 0;
  padding-left: 1.15rem;
}

.message p:last-child,
.message ul:last-child {
  margin-bottom: 0;
}

.field {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

input[type="email"],
input[type="password"],
input[type="time"],
input[type="number"],
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d5cdbf;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

fieldset {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

input:focus,
select:focus {
  outline: 3px solid #b7e0da;
  border-color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.button.secondary:hover {
  background: var(--info-bg);
  color: var(--accent-dark);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button:disabled:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.secondary:disabled:hover {
  background: transparent;
  color: var(--accent);
}

.after-form,
.auth-links {
  margin-top: 1rem;
}

.auth-links {
  display: grid;
  gap: 0.45rem;
}

.text-link {
  font-weight: 700;
}

.dashboard-grid,
.button-row {
  display: grid;
  gap: 1rem;
}

.dashboard-grid > * {
  min-width: 0;
}

.empty {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f7f4ee;
  color: var(--muted);
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.step-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.badge {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: #c9ebe6;
}

@media (min-width: 800px) {
  .brand-name {
    max-width: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .wide {
    grid-column: 1 / -1;
  }

  .button-row {
    grid-template-columns: 1fr 1fr;
  }
}

.page-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.setup-steps {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.redirect-uri {
  display: block;
  margin: 0.8rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f7f4ee;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
}

.calendar-list,
.event-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.calendar-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.calendar-item input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.35rem;
  flex: 0 0 auto;
}

.calendar-item label {
  margin: 0;
  min-width: 0;
}

.calendar-item:last-child,
.event-list li:last-child {
  border-bottom: 0;
}

.event-list li {
  min-width: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.event-title {
  margin: 0;
  font-weight: 700;
}

.event-meta {
  margin: 0;
  color: var(--muted);
}

.stack-form {
  margin-top: 0.75rem;
}

code {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
