:root {
  color-scheme: light;
  font-family: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: #0c1c33;
  background: #e5f3f8;
  font-synthesis: none;
  --muted: #3e536a;
  --line: #d5e0e7;
  --aqua: #d4f6f6;
  --accent: #125b74;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 12% 10%, #eefafd, transparent 55%); padding: clamp(.7rem, 3vw, 2.75rem); }
.dashboard { max-width: 71rem; margin: 0 auto; padding: clamp(1rem, 2.7vw, 2.45rem); border-radius: clamp(1.25rem, 3vw, 2.4rem); background: #fcfdfe; box-shadow: 0 12px 45px #28456e19; }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: -.065em; text-wrap: balance; }
#route { margin-top: .5rem; font-size: clamp(1rem, 1.9vw, 1.23rem); line-height: 1.35; color: var(--muted); font-weight: 600; }
#window { margin-top: .2rem; font-size: .95rem; color: var(--muted); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #087b95; outline-offset: 3px; }
.outline, .primary { background: transparent; color: inherit; border: 1.5px solid #203d53; border-radius: .85rem; padding: .65rem 1rem; font-weight: 650; white-space: nowrap; }
.outline:hover { background: #e9f7fb; }
.primary { color: #fff; background: #153c57; }
.primary:hover { background: #205873; }
.quiet { background: none; border: none; color: var(--accent); padding: .35rem .1rem; text-decoration: underline; text-underline-offset: .2em; }
.panels { display: grid; grid-template-columns: 1.16fr 1fr; border: 1px solid var(--line); border-radius: 1.35rem; overflow: hidden; }
.outfit { background: #f2ece4; padding: clamp(1.15rem, 3vw, 2rem); display: flex; flex-direction: column; min-width: 0; }
.garments { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .1rem; height: clamp(12rem, 24vw, 18rem); align-items: stretch; margin-top: .5rem; }
.garments figure { margin: 0; min-width: 0; display: grid; place-items: center; overflow: hidden; }
.garments figure:first-child { grid-row: span 2; }
.garments img { display: block; object-fit: contain; width: 100%; height: 100%; min-height: 0; mix-blend-mode: darken; }
.garments .accessories { display: flex; align-items: center; }
.garments .accessories img { width: 50%; }
.label, #bring { font-weight: 650; color: #314a61; }
.recommendation h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.05em; line-height: 1.04; margin: .25rem 0 .5rem; }
#wear-detail { color: var(--muted); line-height: 1.5; }
#bring { margin-top: .55rem; line-height: 1.45; }
.timeline { border-left: 1px solid var(--line); padding: 1.25rem clamp(.8rem, 2.5vw, 1.9rem); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.timeline h2 { font-size: 1.1rem; margin: 0 0 .6rem .35rem; }
#moments { list-style: none; padding: 0; margin: 0; }
.moment { display: grid; grid-template-columns: clamp(2rem, 5vw, 4rem) .6rem 1fr; gap: clamp(.55rem, 1.4vw, 1.2rem); padding: .6rem .4rem; align-items: center; border-radius: .85rem; }
.moment.highlight { background: var(--aqua); }
.weather-icon { font-size: clamp(1.6rem, 3.3vw, 2.65rem); text-align: center; }
.marker { position: relative; align-self: stretch; display: grid; place-items: center; }
.marker::before { content: ''; position: absolute; width: 2px; top: -.6rem; bottom: -.6rem; background: #a8c2d3; }
.moment:first-child .marker::before { top: 50%; }
.moment:last-child .marker::before { bottom: 50%; }
.marker::after { content: ''; z-index: 1; width: .65rem; height: .65rem; border-radius: 50%; background: #6c9db8; box-shadow: 0 0 0 2px #fcfdfe; }
.highlight .marker::after { background: #007e8b; }
.moment-title { font-size: 1rem; color: var(--muted); font-weight: 650; }
.temp { font-size: clamp(1.85rem, 3.4vw, 2.8rem); font-weight: 760; line-height: 1.04; letter-spacing: -.06em; margin: .16rem 0; }
.condition { font-size: .95rem; color: var(--muted); }
.brief { background: var(--aqua); border-radius: .85rem; padding: .9rem 1.15rem; margin-top: .75rem; font-size: clamp(1rem, 1.6vw, 1.15rem); font-weight: 700; line-height: 1.4; }
details { margin-top: .7rem; }
summary { cursor: pointer; padding: .65rem 0; font-weight: 650; color: #214962; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .45rem 1rem; align-items: center; margin-top: 1rem; color: var(--muted); font-size: .875rem; }
a { color: var(--accent); text-underline-offset: .2em; }
.state { padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; background: #f1f8fb; }
.state p { margin-bottom: .75rem; }
:root:has(#editor[open]) { overflow: hidden; }
dialog {
  width: min(35rem, calc(100% - 1rem));
  max-width: none;
  max-height: calc(100% - 1rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  color: inherit;
  background: #fcfdfe;
  box-shadow: 0 18px 65px #142c504a;
}
dialog::backdrop { background: #12294566; }
#plans {
  --dialog-inset: clamp(.85rem, 3vw, 1.4rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(46rem, calc(100vh - 1rem - 2px));
  max-height: min(46rem, calc(100dvh - 1rem - 2px));
}
.dialog-heading,
.dialog-footer { padding: .8rem var(--dialog-inset); background: #fcfdfe; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 1.48rem; line-height: 1.12; letter-spacing: -.035em; }
.dialog-heading p { margin-top: .2rem; font-size: .875rem; color: var(--muted); }
.close {
  display: grid;
  flex: 0 0 2.75rem;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: .65rem;
  color: var(--muted);
  background: #eef4f7;
  font-size: 1.6rem;
  line-height: 1;
}
.close:hover { background: #e3eff5; }
.plans-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 1rem;
  padding: .95rem var(--dialog-inset) 1.1rem;
}
.plan-section + .plan-section { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.plan-section h3 { margin: 0 0 .62rem; font-size: 1rem; line-height: 1.3; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .65rem .7rem; }
.fields label { display: grid; gap: .26rem; min-width: 0; font-size: .875rem; font-weight: 650; }
.fields .wide { grid-column: 1 / -1; }
.fields small { color: var(--muted); font-size: .78rem; font-weight: 500; white-space: nowrap; }
.fields input,
.fields select {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-height: 2.75rem;
  padding: .38rem .6rem;
  border: 1px solid #9db2c2;
  border-radius: .55rem;
  background-color: #fff;
  color: inherit;
  font: 400 1rem/1.25 Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
.fields input::placeholder { color: #52677a; opacity: 1; }
.fields input:is([type="date"], [type="time"]) {
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.fields input::-webkit-date-and-time-value {
  min-width: 0;
  margin: 0;
  text-align: left;
}
.fields input::-webkit-datetime-edit { min-width: 0; padding: 0; }
.fields input::-webkit-calendar-picker-indicator { margin-inline-start: 0; padding: 0; }
.fields select {
  appearance: none;
  padding-inline-end: 1.55rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23203d53' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right .55rem center;
  background-repeat: no-repeat;
  background-size: .75rem;
}
.fields select:focus-visible { outline: 3px solid #087b95; outline-offset: 3px; }
.form-note { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.outdoor-fields { min-inline-size: 0; margin: .8rem 0 0; padding: .65rem .65rem .35rem; border: 1px solid var(--line); border-radius: .7rem; }
.outdoor-fields legend { padding: 0 .25rem; font-size: .875rem; font-weight: 650; }
.outdoor-fields .form-note { margin-top: .4rem; }
.optional-section { margin-top: .35rem; }
.optional-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: 0 .1rem;
  border: 0;
  border-radius: .25rem;
  color: var(--accent);
  background: transparent;
  font-size: .875rem;
  font-weight: 700;
}
.optional-toggle:hover { text-decoration: underline; text-underline-offset: .18em; }
.optional-toggle::before { content: '+' / ''; width: .85rem; font-size: 1.1rem; }
.optional-toggle[aria-expanded="true"]::before { content: '−' / ''; }
.dialog-footer { border-top: 1px solid var(--line); }
#form-error { margin-bottom: .55rem; color: #9d3029; font-size: .875rem; }
#form-error:empty { display: none; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.actions button { min-height: 2.75rem; }
@media (max-width: 480px) {
  .fields .place-field, .context-options label { grid-column: 1 / -1; }
  .actions .primary { flex: 1; }
}
@media (max-width: 730px) {
  .panels { grid-template-columns: 1fr; }
  .timeline { border-left: 0; border-top: 1px solid var(--line); }
  .garments { height: clamp(10rem, 53vw, 16rem); }
}
@media (max-width: 420px) {
  .heading { flex-direction: column; gap: .75rem; }
  .heading .outline { padding: .5rem .75rem; }
}

.day-context {
  margin: 0 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #f5fafc;
}
.day-setup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  padding: .55rem .95rem;
}
.day-setup p { font-size: .95rem; font-weight: 650; }
.day-setup button { margin-left: auto; white-space: nowrap; }
.hint-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .4rem .9rem;
  padding: .75rem .95rem;
  border-top: 1px solid var(--line);
  background: #fcfdfe;
}
.hint-form label { font-weight: 700; }
.hint-entry { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.hint-entry input {
  flex: 1 1 12rem;
  min-width: 0;
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid #9db2c2;
  border-radius: .6rem;
  padding: .55rem .7rem;
  background: #fff;
  color: inherit;
}
.hint-entry input::placeholder { color: #546a7e; }
.hint-entry .primary { min-height: 2.65rem; padding: .45rem .8rem; border-radius: .6rem; }
#hint-help, #hint-status { grid-column: 2; font-size: .875rem; line-height: 1.4; color: var(--muted); }
#hint-status:empty { display: none; }
#hint-status { color: var(--accent); font-weight: 650; }
.day-bar { display: flex; flex: 1 1 7rem; min-width: 7rem; max-width: 16rem; height: .45rem; border-radius: 1rem; overflow: hidden; background: #d5e0e7; }
.day-bar span { flex-basis: 0; min-width: 0; }
.day-bar .outside { background: #007e8b; }
.exposure {
  display: inline-block;
  margin-left: .45rem;
  border-radius: .35rem;
  background: #ecf1f5;
  color: #3e536a;
  font-size: .78rem;
  font-weight: 700;
  padding: .07rem .3rem;
}
.exposure.outdoors { background: #d9f2f3; color: #14586a; }
@media (max-width: 540px) {
  .day-setup button { margin-left: 0; }
  .hint-form { grid-template-columns: 1fr; }
  #hint-help, #hint-status { grid-column: 1; }
  .day-bar { order: 3; flex-basis: 100%; max-width: none; }
}
