:root {
  --bg: #f4f4f1;
  --ink: #16181d;
  --card: #fff;
  --line: #e6e5e0;
  --mute: #6b6f76;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 system-ui, sans-serif;
}

body {
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1,
p {
  margin: 0;
}

h1 {
  letter-spacing: -0.02em;
}

h1:focus {
  outline: none;
}

.out {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
}

.mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 20px;
}

.out h1 {
  font-size: 34px;
}

.tagline {
  color: var(--mute);
  font-size: 17px;
  margin: 8px 0 36px;
}

.notice {
  color: var(--ink);
  font-weight: 600;
  margin: -16px 0 16px;
}

.google {
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 1px 2px #0001;
}

.google:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.g {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
}

.fine {
  font-size: 13px;
  color: var(--mute);
  text-align: center;
  margin-top: 14px;
}

.feed {
  padding: 22px 14px;
}

.biz {
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
}

.feed h1 {
  font-size: 28px;
  margin-top: 2px;
}

.sub {
  color: var(--mute);
  margin: 2px 0 18px;
}

.empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  color: var(--mute);
}

.empty b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 4px;
}

.feed {
  padding-bottom: 100px;
}

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mute);
  margin: 22px 0 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}

.head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.card b {
  font-size: 17px;
}

.card small {
  display: block;
  color: var(--mute);
  font-size: 14px;
  margin-top: 2px;
}

.question {
  margin-top: 10px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: none;
  color: var(--ink);
  font-weight: 700;
}

.action.primary {
  flex-basis: 100%;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.action:disabled {
  opacity: 0.5;
}

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

.done-list li {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.done-list b {
  display: block;
}

.done-list small {
  color: var(--mute);
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
  background: #eceae4;
  color: var(--ink);
}

button {
  font: inherit;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

.feed .notice {
  margin: 0 0 12px;
}

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 99px;
  padding: 15px 22px;
  font-weight: 700;
  box-shadow: 0 6px 18px #0004;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  width: max-content;
  max-width: 88%;
  text-align: center;
}

button:focus-visible,
a.action:focus-visible,
input:focus-visible,
.chip-choice:has(input:focus-visible) span {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

dialog {
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ink);
}

dialog::backdrop {
  background: #0006;
}

dialog h2 {
  font-size: 20px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 6px;
}

dialog label,
legend {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  margin: 12px 0 5px;
  padding: 0;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

fieldset > .chip-choice {
  display: inline-block;
  margin: 0 6px 6px 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}

.chip-choice input {
  position: absolute;
  opacity: 0;
}

.chip-choice span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
}

.chip-choice input:checked + span {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.save,
.cancel {
  width: 100%;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
}

.save {
  margin-top: 16px;
  background: var(--ink);
  color: #fff;
  border: 0;
}

.save:disabled {
  opacity: 0.5;
}

.cancel {
  margin-top: 8px;
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
}

.sub .link,
#types-back {
  min-height: 44px;
}

.type-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.type-row {
  width: 100%;
  min-height: 56px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.type-row b {
  font-size: 17px;
}

.type-row small {
  color: var(--mute);
  font-size: 14px;
  white-space: nowrap;
}

.add-type,
.remove {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
}

.add-type {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.remove {
  margin-top: 8px;
}

#type-every {
  max-width: 8em;
}
