:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #fbfbfd;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --ink-tertiary: #86868b;
  --line: rgb(0 0 0 / 10%);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: #e8f2ff;
  --orange: #ff9f0a;
  --green: #248a3d;
  --danger: #d70015;
  --dark: #1d1d1f;
  --dark-secondary: #a1a1a6;
  --shadow: 0 12px 36px rgb(0 0 0 / 8%);
  --focus: 0 0 0 4px rgb(0 113 227 / 18%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
  border-bottom: 1px solid rgb(0 0 0 / 7%);
  background: rgb(251 251 253 / 84%);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.topbar-inner {
  width: min(1080px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 750;
}

.device-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: 13px;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 3px rgb(48 209 88 / 12%);
}

main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 52px;
}

.site-footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-tertiary);
  font-size: 12px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--blue);
}

.site-footer a:focus-visible {
  border-radius: 3px;
  outline: none;
  box-shadow: var(--focus);
}

.intro {
  max-width: 760px;
  margin-bottom: 36px;
}

.eyebrow,
.context-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 650;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy {
  margin: 18px 0 0;
  color: var(--ink-secondary);
  font-size: 21px;
  line-height: 1.5;
}

h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
}

.context-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 42px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgb(0 0 0 / 6%);
}

.weather-block {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.weather-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 28px;
  font-weight: 500;
}

.weather-symbol.is-rainy {
  color: #fff;
  background: #5e5ce6;
}

.weather-copy {
  min-width: 0;
}

.weather-copy .context-kicker {
  margin-bottom: 4px;
  font-size: 12px;
}

.weather-copy h2 {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.weather-detail {
  margin: 4px 0 0;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.location-verification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--ink-tertiary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.location-divider {
  color: rgb(0 0 0 / 22%);
}

.location-map-button {
  min-height: 26px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.location-map-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.location-button,
.secondary-button,
.save-button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.location-button,
.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-muted);
}

.location-button:hover,
.secondary-button:hover {
  border-color: rgb(0 113 227 / 35%);
  color: var(--blue);
}

.location-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.context-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.mode-field,
.rain-control {
  display: grid;
  gap: 7px;
}

.control-label {
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
}

.segmented {
  height: 34px;
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgb(0 0 0 / 6%);
}

.segment {
  min-width: 70px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  outline: none;
  color: var(--ink-secondary);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.segment.is-selected {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 14%);
  font-weight: 600;
}

.rain-control {
  grid-template-columns: auto 40px;
  cursor: pointer;
}

.rain-control .control-label {
  grid-column: 1 / -1;
}

.rain-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  width: 40px;
  height: 24px;
  position: relative;
  border-radius: 999px;
  background: #d1d1d6;
  transition: background 160ms ease;
}

.switch::after {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
  content: "";
  transition: transform 160ms ease;
}

.rain-control input:checked + .switch {
  background: var(--green);
}

.rain-control input:checked + .switch::after {
  transform: translateX(16px);
}

.rain-control input:focus-visible + .switch {
  box-shadow: var(--focus);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 376px;
  gap: 28px;
  align-items: stretch;
}

.editor {
  min-width: 0;
}

.section-heading {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.heading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.count {
  min-width: 72px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--ink-secondary);
  background: rgb(0 0 0 / 5%);
  font-size: 13px;
  text-align: center;
}

.text-button {
  min-height: 32px;
  padding: 3px 0;
  border: 0;
  outline: none;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.text-button:hover {
  color: var(--blue-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button.danger {
  color: var(--danger);
}

.text-button:disabled {
  color: var(--ink-tertiary);
  cursor: default;
  opacity: 0.55;
  text-decoration: none;
}

.tag-editor {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tag-list {
  min-height: 224px;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 2px;
}

.tag-empty {
  width: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  color: var(--ink-tertiary);
  font-size: 14px;
  text-align: center;
}

.option-tag {
  height: 40px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgb(0 113 227 / 24%);
  border-radius: 999px;
  color: #005bb5;
  background: var(--blue-soft);
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.option-tag:hover {
  border-color: rgb(0 113 227 / 48%);
}

.option-tag.is-inactive {
  border-color: var(--line);
  color: var(--ink-tertiary);
  background: var(--canvas);
}

.option-tag.is-dragging {
  z-index: 2;
  opacity: 0.52;
  transform: scale(0.97);
}

.drag-handle,
.tag-toggle,
.tag-edit {
  height: 100%;
  border: 0;
  outline: none;
  color: inherit;
  background: transparent;
}

.drag-handle {
  width: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  cursor: grab;
  font-size: 17px;
  line-height: 1;
  opacity: 0.56;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.tag-toggle,
.tag-edit {
  cursor: pointer;
}

.tag-toggle {
  max-width: 240px;
  padding: 0 7px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 550;
}

.tag-check {
  display: inline-block;
  width: 17px;
  margin-right: 2px;
  font-size: 13px;
}

.is-inactive .tag-check {
  opacity: 0;
}

.rain-badge {
  margin-left: 5px;
  font-size: 12px;
  opacity: 0.72;
}

.tag-edit {
  width: 32px;
  flex: 0 0 auto;
  padding: 0 1px 3px 0;
  border-left: 1px solid rgb(0 113 227 / 13%);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
  opacity: 0.62;
}

.is-inactive .tag-edit {
  border-left-color: var(--line);
}

.tag-edit:hover {
  opacity: 1;
}

.drag-handle:focus-visible,
.tag-toggle:focus-visible,
.tag-edit:focus-visible {
  box-shadow: inset var(--focus);
}

.add-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.option-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.option-input::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-tertiary);
}

.option-input:focus,
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.add-button {
  width: 42px;
  height: 42px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 8px;
  outline: none;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-size: 25px;
  font-weight: 350;
  line-height: 1;
  transition: background 140ms ease, transform 100ms ease;
}

.add-button:hover:not(:disabled) {
  background: var(--blue-hover);
}

.add-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.add-button:active:not(:disabled) {
  transform: scale(0.96);
}

.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: rgb(255 255 255 / 72%);
  cursor: pointer;
  font-size: 14px;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.chip:hover:not(:disabled) {
  border-color: rgb(0 113 227 / 38%);
  color: var(--blue);
  background: var(--blue-soft);
}

.chip:disabled {
  color: var(--ink-tertiary);
  background: transparent;
  cursor: default;
  opacity: 0.62;
}

.decision {
  min-height: 364px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border-radius: 8px;
  color: #f5f5f7;
  background: var(--dark);
  box-shadow: 0 18px 48px rgb(0 0 0 / 16%);
}

.decision-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--dark-secondary);
  font-size: 14px;
  font-weight: 550;
}

.decision-label::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.result-value {
  min-height: 116px;
  display: flex;
  align-items: center;
  margin: 18px 0 10px;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.result-value.is-long {
  font-size: 34px;
}

.result-value.is-very-long {
  font-size: 27px;
}

.result-value.is-revealed {
  animation: result-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.result-status {
  min-height: 42px;
  margin: 0;
  color: var(--dark-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.result-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  color: #f5f5f7;
  font-size: 13px;
  line-height: 1.55;
}

.primary {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  outline: none;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  transition: background 140ms ease, transform 100ms ease;
}

.primary:hover:not(:disabled),
.save-button:hover {
  background: var(--blue-hover);
}

.primary:active:not(:disabled) {
  transform: scale(0.985);
}

.primary:disabled {
  cursor: default;
  opacity: 0.42;
}

.shuffle-icon {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
}

button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.nearby,
.history {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.nearby-heading {
  align-items: end;
}

.section-caption {
  margin: 5px 0 0;
  color: var(--ink-secondary);
  font-size: 13px;
}

.personal-pick {
  max-width: 48%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.store-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.store-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgb(0 0 0 / 5%);
}

.store-photo,
.store-photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 8;
  display: block;
  object-fit: cover;
  background: #e8e8ed;
}

.store-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--ink-tertiary);
  font-size: 25px;
  font-weight: 650;
}

.store-content {
  padding: 15px;
}

.store-name {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}

.store-address {
  min-height: 38px;
  margin: 6px 0 0;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.store-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--ink-secondary);
  background: var(--canvas);
  font-size: 11px;
}

.store-meta .rating {
  color: #9a5b00;
  background: #fff4df;
}

.store-feature {
  margin: 10px 0 0;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.map-link {
  display: inline-block;
  margin-top: 13px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.store-empty,
.store-error {
  grid-column: 1 / -1;
  min-height: 110px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-tertiary);
  background: var(--surface);
  font-size: 14px;
  text-align: center;
}

.store-loading {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8e8ed;
  animation: pulse 1.2s ease-in-out infinite alternate;
}

.history-list {
  margin: 14px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgb(0 0 0 / 5%);
  list-style: none;
}

.history-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 650;
}

.history-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 550;
}

.history-mode {
  display: block;
  margin-top: 3px;
  color: var(--ink-tertiary);
  font-size: 11px;
  font-weight: 400;
}

.history-time {
  color: var(--ink-tertiary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.history-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--ink-tertiary);
  font-size: 14px;
}

.tag-dialog,
.location-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 80px rgb(0 0 0 / 28%);
}

.tag-dialog::backdrop,
.location-dialog::backdrop {
  background: rgb(0 0 0 / 34%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.location-dialog {
  width: min(720px, calc(100% - 28px));
}

.location-dialog-content {
  padding: 24px;
}

.location-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.location-summary div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.location-summary div:last-child {
  border-right: 0;
}

.location-summary dt {
  color: var(--ink-tertiary);
  font-size: 11px;
  font-weight: 600;
}

.location-summary dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.location-map-frame {
  height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8e8ed;
}

.location-map-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.location-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.location-map-footer a {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.location-map-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tag-form {
  padding: 24px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dialog-header .context-kicker {
  margin-bottom: 4px;
  font-size: 12px;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  outline: none;
  color: var(--ink-secondary);
  background: var(--canvas);
  cursor: pointer;
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
}

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

.form-field input,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: var(--surface-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  resize: vertical;
}

.form-field input {
  height: 44px;
}

.rain-friendly {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.rain-friendly input {
  position: absolute;
  opacity: 0;
}

.checkbox-mark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: transparent;
  background: #fff;
  font-size: 13px;
}

.rain-friendly input:checked + .checkbox-mark {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.rain-friendly input:focus-visible + .checkbox-mark {
  box-shadow: var(--focus);
}

.rain-friendly strong,
.rain-friendly small {
  display: block;
}

.rain-friendly strong {
  font-size: 14px;
}

.rain-friendly small {
  margin-top: 3px;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-actions-right {
  display: flex;
  gap: 9px;
}

.save-button {
  border: 0;
  color: #fff;
  background: var(--blue);
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 0.9;
  }
}

@media (max-width: 920px) {
  .context-panel {
    grid-template-columns: 1fr;
  }

  .context-controls {
    justify-content: space-between;
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .decision {
    min-height: 330px;
  }

  .store-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .topbar-inner,
  main {
    width: min(100% - 28px, 1080px);
  }

  .device-state {
    font-size: 11px;
  }

  main {
    padding: 38px 0 60px;
  }

  .intro {
    margin-bottom: 30px;
  }

  h1 {
    font-size: 36px;
  }

  .intro-copy {
    font-size: 17px;
  }

  .context-panel {
    margin-bottom: 34px;
    padding: 16px;
  }

  .weather-block {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  .weather-symbol {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .location-button {
    grid-column: 1 / -1;
  }

  .context-controls {
    align-items: end;
  }

  .segment {
    min-width: 62px;
    padding: 0 7px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .heading-meta {
    gap: 9px;
  }

  .tag-editor {
    min-height: 292px;
    padding: 14px;
  }

  .tag-list {
    min-height: 196px;
  }

  .tag-toggle {
    max-width: 170px;
  }

  .decision {
    min-height: 310px;
    padding: 24px;
  }

  .result-value {
    min-height: 105px;
    font-size: 39px;
  }

  .result-value.is-long {
    font-size: 30px;
  }

  .result-value.is-very-long {
    font-size: 24px;
  }

  .nearby,
  .history {
    margin-top: 44px;
  }

  .nearby-heading {
    display: block;
  }

  .personal-pick {
    max-width: none;
    margin-top: 10px;
    text-align: left;
  }

  .store-list {
    grid-template-columns: 1fr;
  }

  .store-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .store-photo,
  .store-photo-placeholder {
    height: 100%;
    min-height: 170px;
    aspect-ratio: auto;
  }

  .history-item {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px 13px;
  }

  .tag-form {
    padding: 20px;
  }

  .location-dialog-content {
    padding: 20px;
  }

  .location-summary {
    grid-template-columns: 1fr;
  }

  .location-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .location-summary div:last-child {
    border-bottom: 0;
  }

  .location-map-frame {
    height: 300px;
  }

  .location-map-footer {
    align-items: flex-start;
  }

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

  .form-field-wide {
    grid-column: auto;
  }

  .dialog-actions {
    align-items: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
