:root {
  color-scheme: light;
  --bg: #f6f2ec;
  --ink: #191715;
  --muted: #756d64;
  --line: rgba(25, 23, 21, 0.12);
  --accent: #df3f57;
  --accent-dark: #ad263b;
  --mint: #78cbb5;
  --blue: #3a68d8;
  --paper: rgba(255, 252, 247, 0.88);
  --shadow: 0 22px 54px rgba(57, 45, 32, 0.16);
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  max-width: 100%;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(223, 63, 87, 0.16), transparent 34%),
    linear-gradient(210deg, rgba(120, 203, 181, 0.2), transparent 40%),
    var(--bg);
}

body.sheet-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  text-align: center;
  touch-action: manipulation;
}

button,
.primary-action,
.secondary-action,
.upload-button,
.segmented span,
.suggestion-list button,
.schedule-group-hints button,
.schedule-card-actions button,
.inline-actions button,
.record-actions button,
.quick-memo-list button,
.stepper button,
.tool-grid button,
.ev-picker button,
.ev-preset-actions button,
.bottom-nav button {
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.app-shell {
  width: min(100%, 480px);
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 18px 92px;
  display: grid;
  align-items: center;
}

.gate-view,
.home-view {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.tab-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.kicker {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: 0;
}

.intro {
  max-width: 280px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.gate-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.gate-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.code-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
}

.code-row input {
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fffdfa;
  color: var(--ink);
}

.code-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(223, 63, 87, 0.14);
}

.code-row button,
.primary-action,
.icon-button {
  border: 0;
  cursor: pointer;
}

.code-row button,
.primary-action {
  border-radius: 14px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  text-align: center;
}

.code-row button:active,
.primary-action:active,
.icon-button:active {
  transform: translateY(1px);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.message,
.action-message {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.home-view {
  align-self: start;
  padding-top: 4px;
}

.tab-page {
  width: 100%;
}

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

.home-header h1 {
  margin-bottom: 8px;
  font-size: 38px;
}

.date-label {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: #1d1a17;
  box-shadow: var(--shadow);
}

.hero-panel div {
  min-height: 112px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.075);
  color: white;
}

.hero-panel div:first-child {
  grid-column: 1 / -1;
  min-height: 128px;
  background:
    linear-gradient(135deg, rgba(223, 63, 87, 0.58), rgba(58, 104, 216, 0.34)),
    rgba(255, 255, 255, 0.08);
}

.hero-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.hero-panel strong {
  display: block;
  margin-top: 18px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-panel b {
  font: inherit;
}

.hero-panel div:first-child strong {
  font-size: 56px;
}

.personal-hero {
  grid-template-columns: 1fr 1fr;
}

.hero-date-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.hero-date-control label {
  min-width: 0;
}

.hero-date-control input,
.hero-date-control button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf3;
  font-weight: 900;
}

.hero-date-control input {
  padding: 0 12px;
  color-scheme: dark;
}

.hero-date-control button {
  padding: 0 14px;
}

.personal-hero div:nth-child(2) {
  grid-column: 1 / -1;
}

.personal-hero div:nth-child(2) strong {
  font-size: 48px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.2;
}

.home-panel-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.9);
  backdrop-filter: blur(12px);
}

.home-panel-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.home-panel-tabs button.active {
  background: var(--ink);
  color: white;
}

.wide-action {
  width: 100%;
  margin-top: 10px;
}

.small-action {
  width: auto;
  min-height: 40px;
  padding: 0 12px;
  margin-top: 0;
  font-size: 13px;
}

.section-block {
  margin-top: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.section-title span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.friend-list article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
}

.friend-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.friend-list strong,
.mini-grid strong {
  display: block;
  font-size: 15px;
}

.friend-list p,
.mini-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.friend-list article > span {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

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

.person-stat-list .empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.person-stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--owner-color, var(--accent));
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink);
  text-align: left;
  line-height: 1.35;
}

.person-stat-card strong {
  display: block;
  font-size: 17px;
}

.person-stat-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.person-stat-card > span {
  display: grid;
  justify-items: end;
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.person-stat-card b {
  font: inherit;
}

.person-stat-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.today-line-list {
  display: grid;
  gap: 8px;
}

.today-line-list article {
  display: grid;
  gap: 4px;
  min-height: 58px;
  align-content: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 252, 247, 0.78);
}

.today-line-list strong {
  font-size: 14px;
}

.today-line-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.today-line-list .empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.today-board {
  display: grid;
  gap: 10px;
}

.today-board article {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.82);
}

.today-board span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.today-board strong {
  font-size: 22px;
  line-height: 1.15;
}

.today-board p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.receipt-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 10px 24px rgba(57, 45, 32, 0.08);
}

.receipt-card pre {
  margin: 0;
  color: var(--ink);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
}

.section-collapse-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.section-block.is-collapsed > :not(.section-title) {
  display: none;
}

.quick-schedule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-schedule-list button {
  display: inline-grid;
  gap: 3px;
  min-height: 48px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.quick-schedule-list strong {
  font-size: 13px;
  line-height: 1.2;
}

.quick-schedule-list span {
  font-size: 10px;
  font-weight: 900;
  opacity: 0.72;
}

.queue-form {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
  margin-bottom: 10px;
}

.queue-form label {
  min-width: 0;
}

.queue-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.queue-target-field,
.queue-note-field {
  grid-column: 1 / -1;
}

.queue-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #fffdfa;
}

.queue-form button {
  align-self: end;
  min-height: 44px;
}

.queue-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
  margin-bottom: 10px;
}

.queue-suggestions button {
  display: inline-grid;
  gap: 2px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid rgba(58, 104, 216, 0.18);
  border-radius: 999px;
  background: rgba(58, 104, 216, 0.07);
  color: var(--blue);
}

.queue-suggestions strong {
  font-size: 11px;
  line-height: 1.15;
}

.queue-suggestions span {
  font-size: 9px;
  font-weight: 900;
  opacity: 0.72;
}

.queue-list {
  display: grid;
  gap: 8px;
}

.queue-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--owner-color, var(--accent));
  border-radius: 15px;
  background: rgba(255, 252, 247, 0.78);
}

.queue-list article > div:first-child {
  min-width: 0;
}

.queue-list strong {
  display: block;
  font-size: 14px;
}

.queue-list p,
.queue-list small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.queue-list button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.queue-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(38px, auto));
  gap: 6px;
  flex-shrink: 0;
}

.queue-actions button {
  padding: 0 9px;
}

.mvp-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mvp-list article {
  display: grid;
  align-content: center;
  min-height: 98px;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--owner-color, var(--accent));
  border-radius: 15px;
  background: rgba(255, 252, 247, 0.78);
  text-align: center;
}

.mvp-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mvp-list strong {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.2;
}

.mvp-list p {
  margin: 5px 0 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.mvp-list .empty,
.missing-alert-list .calm,
.missing-alert-list article {
  grid-column: 1 / -1;
}

.missing-alert-list {
  display: grid;
  gap: 8px;
}

.missing-alert-list article,
.missing-alert-list .calm {
  padding: 14px;
  border: 1px solid rgba(223, 63, 87, 0.18);
  border-radius: 15px;
  background: rgba(223, 63, 87, 0.07);
}

.missing-alert-list .calm {
  border-color: rgba(120, 203, 181, 0.26);
  background: rgba(120, 203, 181, 0.09);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.missing-alert-list strong {
  display: block;
  color: var(--accent-dark);
  font-size: 14px;
}

.missing-alert-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.schedule-tools {
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}

.schedule-group-hints {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(58, 104, 216, 0.16);
  border-radius: 14px;
  background: rgba(58, 104, 216, 0.06);
}

.schedule-group-hints p {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.schedule-group-hints > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-group-hints button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(58, 104, 216, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.schedule-source-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.schedule-source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.78);
}

.schedule-source-item strong,
.schedule-source-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.schedule-source-item strong {
  font-size: 14px;
}

.schedule-source-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.schedule-card {
  display: block;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.8);
}

.schedule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.schedule-card-head span,
.schedule-card-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.schedule-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.schedule-card p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.schedule-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.schedule-cast-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.schedule-cast-row button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(58, 104, 216, 0.18);
  border-radius: 999px;
  background: rgba(58, 104, 216, 0.07);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.schedule-source-row b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--owner-color, var(--accent)) 14%, white);
  color: var(--owner-color, var(--accent-dark));
  font-size: 10px;
}

.schedule-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-card-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.schedule-card a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

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

.detail-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
}

.detail-list strong {
  display: block;
  font-size: 15px;
}

.detail-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-list span {
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.inline-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.inline-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.inline-actions button:last-child {
  color: var(--accent-dark);
}

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

.calendar-head h2 {
  margin-bottom: 0;
  font-size: 24px;
  text-align: center;
}

.calendar-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-action-row .primary-action,
.calendar-action-row .secondary-action {
  min-height: 52px;
  margin-top: 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-cell {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  min-height: 66px;
  padding: 8px 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 252, 247, 0.72);
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

.calendar-cell.blank {
  border: 0;
  background: transparent;
}

.calendar-cell.today {
  border-color: rgba(58, 104, 216, 0.45);
}

.calendar-cell.selected {
  border-color: rgba(223, 63, 87, 0.55);
  background: rgba(223, 63, 87, 0.12);
}

.calendar-cell > span {
  font-size: 13px;
  font-weight: 900;
}

.calendar-cell strong {
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1;
}

.calendar-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.calendar-cell em,
.calendar-cell i {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 7px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-cell em {
  padding: 3px 2px;
  background: rgba(25, 23, 21, 0.08);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}

.calendar-cell i {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
}

.calendar-inline-detail {
  display: none;
}

.owner-record-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--owner-color, var(--accent));
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.76);
}

.owner-record-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.owner-record-group header strong,
.mypage-date-group header strong {
  display: block;
  font-size: 15px;
}

.owner-record-group header span,
.mypage-date-group header p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.record-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.record-mini-card > div:first-child {
  min-width: 0;
}

.record-mini-card strong {
  display: block;
  font-size: 13px;
}

.record-mini-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

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

.mypage-profile h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.helper-text {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: min(calc(100% - 20px), 480px);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.92);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 4px;
}

.bottom-nav button.active {
  background: var(--ink);
  color: white;
}

.gauge-hero {
  padding: 20px;
  border-radius: 20px;
  background: #1d1a17;
  color: white;
  box-shadow: var(--shadow);
}

.gauge-hero h2 {
  margin-bottom: 16px;
  font-size: 30px;
}

.gauge-meter {
  position: relative;
  height: 54px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.gauge-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--accent));
  transition: width 240ms ease;
}

.gauge-meter strong {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  place-items: center;
  font-size: 27px;
}

.gauge-title {
  margin: 16px 0 6px;
  color: white;
  font-size: 19px;
  font-weight: 900;
}

.gauge-hero .helper-text {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.analysis-grid article {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
  text-align: center;
}

.analysis-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analysis-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.2;
}

.analysis-grid b {
  font: inherit;
}

.settlement-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(223, 63, 87, 0.22), rgba(120, 203, 181, 0.18)),
    #1d1a17;
  color: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.settlement-card .kicker {
  margin-bottom: -2px;
  color: rgba(255, 255, 255, 0.72);
}

.settlement-card h3 {
  margin: 0;
  font-size: 20px;
}

.settlement-card > strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
}

.settlement-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.settlement-card .empty {
  padding: 18px 0;
}

.settlement-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.settlement-mini-grid span {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 58px;
  padding: 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.settlement-mini-grid b {
  color: white;
  font-size: 16px;
}

.settlement-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.settlement-people span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.monthly-recap-card {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid rgba(58, 104, 216, 0.18);
  border-radius: 16px;
  background: rgba(58, 104, 216, 0.07);
}

.monthly-recap-card strong {
  color: var(--blue);
  font-size: 15px;
}

.monthly-recap-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.ranking-list,
.insight-list,
.event-settlement-list {
  display: grid;
  gap: 10px;
}

.ranking-list article,
.insight-list article,
.event-settlement-list article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
}

.event-settlement-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.event-settlement-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.event-settlement-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.event-settlement-list span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.event-settlement-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.rank-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rank-head strong {
  font-size: 14px;
}

.rank-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(25, 23, 21, 0.08);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.insight-list article {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-grid button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.tool-hero {
  padding: 20px;
  border-radius: 20px;
  background: #1d1a17;
  color: white;
  box-shadow: var(--shadow);
}

.tool-hero h2 {
  margin-bottom: 8px;
  font-size: 29px;
}

.tool-hero .helper-text {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.ev-card {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: var(--shadow);
}

.ev-card label > span,
.ev-picker-title span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.ev-card input[type="range"] {
  width: 100%;
}

.ev-picker-block {
  display: grid;
  gap: 8px;
}

.ev-picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ev-picker-title strong {
  color: var(--accent-dark);
  font-size: 16px;
}

.ev-picker {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px;
  gap: 0;
  min-height: 58px;
  overflow-x: auto;
  border-radius: 14px;
  background: #fde9d8;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.ev-picker::-webkit-scrollbar {
  display: none;
}

.ev-picker::before,
.ev-picker::after {
  content: "";
  width: 56px;
}

.ev-picker button {
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(85, 65, 48, 0.42);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
  scroll-snap-align: center;
}

.ev-picker button.active {
  background: #efbd8d;
  color: #543315;
  font-size: 24px;
}

.ev-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ev-results article {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 92px;
  padding: 15px;
  border-radius: 16px;
  background: #1d1a17;
  color: white;
  text-align: center;
}

.ev-results span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.ev-results strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.15;
}

.ev-target-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.ev-target-row strong {
  font-size: 16px;
  white-space: nowrap;
}

.ev-target-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.ev-preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ev-preset-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.ev-preset-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ev-preset-list {
  display: grid;
  gap: 8px;
}

.ev-preset-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.ev-preset-card > button {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
  line-height: 1.25;
}

.ev-preset-card strong,
.ev-preset-card span,
.ev-preset-card small {
  display: block;
}

.ev-preset-card strong {
  font-size: 14px;
}

.ev-preset-card span {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.ev-preset-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ev-preset-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 58px;
}

.ev-preset-actions button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.upload-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.upload-result {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.78);
}

.upload-result strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.upload-result p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-result ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1.5;
}

.inside-sheet {
  margin-top: 20px;
}

.mypage-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mypage-summary button {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 104px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: #1d1a17;
  color: white;
  text-align: center;
}

.mypage-summary button:first-child {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(223, 63, 87, 0.58), rgba(58, 104, 216, 0.34)),
    #1d1a17;
}

.mypage-summary span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.mypage-summary strong {
  display: block;
  margin-top: 10px;
  font-size: 27px;
  line-height: 1;
}

.mypage-summary button:first-child strong {
  font-size: 44px;
}

.mypage-summary b {
  font: inherit;
}

.mypage-detail-panel {
  height: min(94dvh, 820px);
}

.mypage-detail-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.mypage-detail-insights article {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 252, 247, 0.78);
}

.mypage-detail-insights span,
.mypage-detail-insights p {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.mypage-detail-insights strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.1;
  word-break: keep-all;
}

.mypage-detail-calendar-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.mypage-detail-calendar-head strong {
  text-align: center;
  font-size: 18px;
}

.mypage-detail-calendar-grid {
  margin-bottom: 16px;
}

.profile-form {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
}

.profile-form label {
  min-width: 0;
}

.profile-form label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-form input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #fffdfa;
}

.profile-form input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdfa;
}

.profile-form button {
  grid-column: 1 / -1;
  min-height: 46px;
}

.badge-list,
.price-preset-list,
.mypage-pattern-list {
  display: grid;
  gap: 8px;
}

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

.badge-list article,
.price-preset-list article,
.mypage-pattern-list article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 252, 247, 0.78);
}

.badge-list strong {
  display: block;
  color: var(--accent-dark);
  font-size: 14px;
}

.badge-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.price-preset-form {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 8px;
  margin-bottom: 8px;
}

.price-preset-form input,
.mypage-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #fffdfa;
}

.price-preset-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-preset-list span {
  font-size: 14px;
  font-weight: 900;
}

.price-preset-list button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.mypage-search {
  display: block;
  margin-bottom: 10px;
}

.mypage-search span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mypage-pattern-list {
  margin-bottom: 10px;
}

.mypage-pattern-list article {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

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

.mypage-record-list .empty,
.mypage-record-list article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.78);
}

.mypage-record-list .empty {
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.mypage-record-list article {
  padding: 16px;
}

.mypage-date-group {
  padding: 14px;
}

.mypage-date-group > header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mypage-date-group .detail-list {
  margin-top: 10px;
}

.mypage-record-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mypage-record-main strong {
  display: block;
  font-size: 15px;
}

.mypage-record-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mypage-record-main > span {
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.record-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.record-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.record-actions button:last-child {
  color: var(--accent-dark);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  touch-action: pan-y;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 14, 0.42);
  touch-action: none;
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 520px);
  max-width: 100%;
  height: min(92dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 18px 26px;
  border-radius: 24px 24px 0 0;
  background: #fffaf3;
  box-shadow: 0 -24px 70px rgba(25, 23, 21, 0.24);
  transform: translateX(-50%);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

#record-sheet .sheet-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(94dvh, 790px);
  overflow: hidden;
  padding-bottom: 0;
}

#record-sheet .record-form {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 104px;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.sheet-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.sheet-header h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.record-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.record-form label,
.record-form fieldset {
  min-width: 0;
}

.record-form label > span,
.record-form legend {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.record-form input[type="text"],
.record-form input[type="date"],
.record-form input[type="number"],
.record-form select,
.record-form textarea,
.record-form output {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fffdfa;
  color: var(--ink);
}

.record-form textarea {
  min-height: 86px;
  padding-top: 12px;
  resize: vertical;
}

.record-form output {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-align: center;
}

.record-form input:focus,
.record-form select:focus,
.record-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(223, 63, 87, 0.12);
}

.record-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.form-grid {
  display: grid;
  gap: 10px;
}

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

.segmented {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(5, 1fr);
}

.segmented label {
  display: block;
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  min-height: 46px;
  padding: 2px 6px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.segmented input:checked + span {
  border-color: rgba(223, 63, 87, 0.32);
  background: rgba(223, 63, 87, 0.12);
  color: var(--accent-dark);
}

.price-options {
  grid-template-columns: repeat(3, 1fr);
}

.search-field {
  display: block;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggestion-list button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.empty-options {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.compact-sheet {
  max-height: none;
}

.sheet-actions {
  position: sticky;
  bottom: -26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 8px;
  background: linear-gradient(rgba(255, 250, 243, 0), #fffaf3 22%);
}

#record-sheet .sheet-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.96);
  backdrop-filter: blur(12px);
}

.sheet-actions .primary-action,
.sheet-actions .secondary-action {
  width: 100%;
  min-height: 56px;
  margin-top: 0;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
}

.stepper button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.stepper input {
  text-align: center;
  font-weight: 900;
}

.quick-memo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-memo-list button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.keep-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.keep-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.hidden {
  display: none;
}

.save-success {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 17, 14, 0.42);
}

.save-success.hidden {
  display: none;
}

.save-success-panel {
  width: min(100%, 390px);
  padding: 24px;
  border-radius: 20px;
  background: #fffaf3;
  box-shadow: var(--shadow);
}

.save-success-panel h2 {
  margin-bottom: 8px;
  font-size: 26px;
}

.save-success-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.save-success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.save-success-actions .primary-action,
.save-success-actions .secondary-action {
  min-height: 58px;
  padding-inline: 10px;
  margin-top: 0;
  line-height: 1.25;
}

.save-success-actions .primary-action {
  grid-column: 1 / -1;
}

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

  h1 {
    font-size: 36px;
  }

  .home-header h1 {
    font-size: 33px;
  }

  .hero-panel div:first-child strong {
    font-size: 48px;
  }

  .form-grid.two,
  .segmented,
  .price-options {
    grid-template-columns: 1fr 1fr;
  }

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

  .mypage-detail-insights {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  .app-shell {
    width: min(100%, 560px);
  }
}
