:root {
  --ink: #493d34;
  --muted: #94877b;
  --paper: #fbf5e7;
  --paper-line: rgba(120, 103, 84, 0.13);
  --card: #fffefa;
  --line: #54483f;
  --orange: #f7b73e;
  --red: #f46b59;
  --green: #76bf58;
  --blue: #5ba7d7;
  --mint: #42b7a5;
  --purple: #9671d7;
  --yellow: #f2cf51;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(var(--paper-line) 1px, transparent 1px) 0 0 / 100% 38px,
    var(--paper);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 36px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 6px;
}

.logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 4px 0 rgba(73, 61, 52, 0.1);
}

.logo-letter {
  display: inline-block;
  transform-origin: center bottom;
}

.logo-g {
  color: var(--red);
  transform: rotate(-3deg);
}

.logo-u {
  color: var(--orange);
  transform: translateY(3px) rotate(2deg);
}

.logo-s {
  color: var(--green);
  transform: rotate(-2deg);
}

.logo-t {
  color: var(--blue);
  transform: translateY(-5px) rotate(4deg);
}

.logo-a {
  color: var(--purple);
  transform: rotate(-2deg);
}

.logo-spark {
  color: var(--orange);
  font-size: 31px;
  line-height: 1;
  vertical-align: top;
  transform: translateY(-22px) rotate(14deg);
}

.tagline {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.home-link,
.circle-button {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 5px solid var(--line);
  border-radius: 999px;
  background: #fffdfa;
  box-shadow: 0 4px 0 rgba(73, 61, 52, 0.12);
  text-decoration: none;
  font-size: 30px;
  font-weight: 900;
}

.home-link {
  width: 52px;
  height: 52px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.install-button {
  min-height: 38px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  padding: 0 18px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(73, 61, 52, 0.12);
}

.date-board {
  padding: 0 0 14px;
}

.month-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.month-action-row label,
.date-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 4px solid var(--line);
  border-radius: 20px;
  background: #fffdfa;
  padding: 5px 10px;
  font-weight: 800;
}

.month-action-row label {
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.month-action-row select {
  min-height: 24px;
}

.month-action-row span,
.date-picker span {
  color: var(--muted);
  font-size: 13px;
}

.date-picker-wrap {
  float: right;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.date-picker-wrap > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.date-picker {
  border-width: 3px;
  border-radius: 16px;
  padding: 4px 10px;
}

.date-picker select {
  min-height: 24px;
  font-size: 15px;
}

select {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  outline: none;
}

.date-row {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
}

.date-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.date-display strong {
  color: var(--ink);
  font-size: 78px;
  line-height: 0.9;
}

.date-display span {
  font-size: 30px;
  font-weight: 900;
}

.date-display #dateWeek {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 25px;
}

.favorite-section,
.panel {
  clear: both;
}

.section-label {
  display: inline-block;
  margin: 10px 0 -8px 18px;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 6px 10px rgba(73, 61, 52, 0.15);
  position: relative;
  z-index: 2;
}

.menu-card {
  position: relative;
  margin: 0 0 22px;
  padding: 24px 20px 20px;
  border: 5px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 8px 0 rgba(73, 61, 52, 0.08);
}

.menu-card::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 42px;
  width: 150px;
  height: 24px;
  background: rgba(247, 183, 62, 0.7);
  transform: rotate(-4deg);
}

.menu-card.is-favorite::before {
  background: rgba(91, 167, 215, 0.62);
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.city-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.city-name-main,
.city-name-sub {
  display: block;
}

.city-name-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.58em;
  font-weight: 800;
  line-height: 1.35;
}

.menu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.menu-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  max-width: 100%;
  border: 4px solid var(--tag-color, var(--orange));
  border-radius: 18px;
  background: color-mix(in srgb, var(--tag-color, var(--orange)) 18%, white);
  padding: 7px 13px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.menu-tag small {
  color: var(--tag-color, var(--orange));
  font-size: 13px;
  font-weight: 900;
}

.menu-tag[data-category="主食"] { --tag-color: var(--orange); }
.menu-tag[data-category="主菜"],
.menu-tag[data-category="丼もの"] { --tag-color: var(--red); }
.menu-tag[data-category="副菜"] { --tag-color: var(--green); }
.menu-tag[data-category="汁もの"] { --tag-color: var(--mint); }
.menu-tag[data-category="麺"] { --tag-color: var(--purple); }
.menu-tag[data-category="デザート等"] { --tag-color: var(--yellow); }
.menu-tag[data-category="飲料"] { --tag-color: var(--blue); }
.menu-tag[data-category="調味料"] { --tag-color: #b9915b; }
.menu-tag[data-category="不明"] { --tag-color: #9a9a9a; }

.tab-bar {
  clear: both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0 14px;
}

.tab {
  min-height: 32px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: #fffdfa;
  color: var(--ink);
  padding: 0 8px;
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(73, 61, 52, 0.08);
}

.tab.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 0 rgba(73, 61, 52, 0.18);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 12px;
}

.panel-head h1 {
  margin: 0;
  font-size: 24px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.register-button {
  flex: 0 0 auto;
  min-height: 46px;
  border: 4px solid var(--line);
  border-radius: 999px;
  background: #fffdfa;
  padding: 0 16px;
  font-weight: 900;
}

.register-button.is-registered {
  background: var(--red);
  color: #fff;
}

.region-block {
  margin-bottom: 20px;
}

.region-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 900;
}

.city-row,
.month-row-card {
  width: 100%;
  margin: 0 0 10px;
  border: 3px solid rgba(73, 61, 52, 0.38);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
}

.city-row {
  background: #fff8e6;
}

.month-row-card {
  background: #eef9f5;
}

.city-row {
  cursor: pointer;
}

.city-row:hover {
  border-color: var(--line);
}

.row-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-weight: 900;
}

.row-title .city-name-sub {
  font-size: 13px;
}

.row-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-note,
.status-message {
  color: var(--muted);
}

.empty-note {
  margin: 0;
  padding: 14px;
  border: 3px dashed rgba(73, 61, 52, 0.32);
  border-radius: 16px;
  background: rgba(255, 253, 250, 0.55);
}

.monthly-list {
  display: grid;
  gap: 10px;
}

.status-message {
  min-height: 22px;
  margin: 18px 0 0;
  font-size: 13px;
}

.install-hint {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(73, 61, 52, 0.32);
}

.install-hint[hidden] {
  display: none;
}

.install-hint__body {
  position: relative;
  width: min(420px, 100%);
  border: 4px solid var(--line);
  border-radius: 22px;
  background: #fffdfa;
  padding: 20px;
  box-shadow: 0 10px 0 rgba(73, 61, 52, 0.18);
}

.install-hint__body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.install-hint__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
}

@media (max-width: 520px) {
  .app-shell {
    padding-inline: 14px;
  }

  .logo {
    font-size: 44px;
  }

  .date-row {
    grid-template-columns: 56px 1fr 56px;
  }

  .circle-button,
  .home-link {
    width: 52px;
    height: 52px;
  }

  .install-button {
    padding: 0 14px;
    line-height: 1.15;
  }

  .date-display strong {
    font-size: 64px;
  }

  .date-display span {
    font-size: 24px;
  }

  .date-display #dateWeek {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .panel-head--register {
    align-items: stretch;
    flex-direction: column;
  }

  .register-button {
    width: 100%;
  }
}
