:root {
  --paper: #f4ead7;
  --paper-deep: #ead8ba;
  --surface: #fffaf0;
  --surface-strong: #fffef9;
  --ink: #1c211d;
  --ink-soft: #5c625c;
  --line: #cbbda6;
  --brand: #d64c2f;
  --brand-dark: #9d2f1c;
  --brand-soft: #f9ddd3;
  --pine: #1f5a4a;
  --pine-dark: #123d32;
  --pine-soft: #dcece5;
  --warning: #8d3a20;
  --warning-soft: #fff0e5;
  --shadow: 0 28px 70px rgba(67, 48, 26, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  max-width: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.92) 0 8%, transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(214, 76, 47, 0.10) 0 8%, transparent 31%),
    repeating-linear-gradient(122deg, transparent 0 33px, rgba(78, 60, 37, 0.035) 34px 35px),
    linear-gradient(145deg, #f8f0df 0%, var(--paper) 52%, #ecddc5 100%);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: radial-gradient(rgba(61, 46, 28, 0.09) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  opacity: 0.32;
}

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

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

a {
  color: inherit;
}

.beta-topbar {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-preview-strip {
  width: min(1160px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #0f766e;
  border-radius: 12px;
  color: #134e4a;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

.admin-preview-strip a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: #134e4a;
  white-space: nowrap;
  text-underline-offset: 3px;
}

.admin-preview-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(120, 91, 52, 0.28);
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(28, 33, 29, 0.86);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.brand-copy .brand-home-hint {
  display: block;
  color: var(--pine-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pine-dark);
  background: rgba(255, 254, 249, 0.74);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pine-dark);
  background: rgba(255, 254, 249, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.flash-stack {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 14px;
  display: grid;
  gap: 8px;
}

.flash-message {
  padding: 12px 15px;
  border: 1px solid #93bcae;
  border-radius: 13px;
  color: var(--pine-dark);
  background: #eaf6f1;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(33, 74, 61, 0.08);
}

.flash-message.alert {
  border-color: #dfa38e;
  color: var(--warning);
  background: var(--warning-soft);
}

.beta-main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 56px;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(330px, 0.93fr);
  overflow: hidden;
  border: 1px solid rgba(108, 82, 48, 0.26);
  border-radius: 30px 12px 30px 12px;
  background: rgba(255, 250, 240, 0.91);
  box-shadow: var(--shadow);
  animation: stage-in 540ms cubic-bezier(0.21, 0.8, 0.28, 1) both;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-panel {
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.66), transparent 72%),
    var(--surface);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.login-panel h1,
.page-heading h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.login-panel h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.login-lead {
  margin: 12px 0 28px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.login-form {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.form-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.form-field label {
  color: #4b4d47;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.form-help {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.form-input,
.password-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  border: 1.5px solid #b8a98f;
  border-radius: 13px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.form-input {
  padding: 12px 14px;
}

select.form-input {
  height: 52px;
}

.password-input {
  padding: 12px 54px 12px 14px;
}

.form-input:focus,
.password-input:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 4px rgba(31, 90, 74, 0.13);
  transform: translateY(-1px);
}

.password-wrap {
  position: relative;
  min-width: 0;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 42px;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: var(--pine-dark);
  background: var(--pine-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-50%);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--pine);
  flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.text-button,
.danger-button {
  min-height: 50px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.primary-button {
  border: 1px solid var(--pine-dark);
  color: #fff;
  background: var(--pine);
  box-shadow: 0 5px 0 var(--pine-dark);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  box-shadow: none;
  transform: translateY(3px);
}

.secondary-button {
  border: 1.5px solid #87765d;
  color: #493f31;
  background: #fffdf7;
  box-shadow: 0 4px 0 #d2c3aa;
}

.danger-button {
  border: 1px solid #913521;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 0 #913521;
}

.text-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--pine-dark);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(31, 90, 74, 0.38);
  text-underline-offset: 4px;
}

.button-stack {
  display: grid;
  gap: 11px;
}

.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: #8b806f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.separator::before,
.separator::after {
  height: 1px;
  content: "";
  background: #d6c9b5;
  flex: 1;
}

.registration-callout {
  margin-top: 22px;
  padding: 15px;
  border: 1px dashed #ba7a60;
  border-radius: 13px;
  background: var(--brand-soft);
  text-align: center;
}

.registration-callout p {
  margin: 0 0 10px;
  color: #74402e;
  font-size: 12px;
  font-weight: 800;
}

.play-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  color: #fef8eb;
  background:
    linear-gradient(160deg, rgba(18, 61, 50, 0.96), rgba(12, 39, 34, 0.98)),
    var(--pine-dark);
}

.play-panel::before,
.play-panel::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.play-panel::before {
  width: 320px;
  height: 320px;
  top: -185px;
  right: -125px;
}

.play-panel::after {
  width: 190px;
  height: 190px;
  right: 24px;
  bottom: -126px;
}

.play-copy {
  position: relative;
  z-index: 1;
}

.play-copy small {
  color: #b9dbce;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.play-copy h2 {
  max-width: 380px;
  margin: 14px 0 12px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.35;
}

.play-copy p {
  max-width: 390px;
  margin: 0;
  color: #d2e6df;
  line-height: 1.9;
}

.page-shell {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.page-heading,
.content-card {
  min-width: 0;
  border: 1px solid rgba(108, 82, 48, 0.25);
  background: rgba(255, 250, 240, 0.93);
  box-shadow: 0 18px 42px rgba(67, 48, 26, 0.11);
}

.page-heading {
  padding: clamp(24px, 4vw, 42px);
  border-radius: 26px 10px 26px 10px;
}

.page-heading h1 {
  font-size: clamp(29px, 4vw, 44px);
}

.page-heading p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.content-card {
  padding: 22px;
  border-radius: 18px 8px 18px 8px;
}

.content-card h2,
.content-card h3 {
  margin: 0 0 10px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.content-card p {
  color: var(--ink-soft);
  line-height: 1.75;
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.fact {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.fact small {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fact strong {
  overflow-wrap: anywhere;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.feature-tile {
  min-height: 125px;
  padding: 17px;
  border: 1px solid #d1c2aa;
  border-radius: 16px 7px 16px 7px;
  background: #fffdf7;
}

.feature-tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.feature-tile-link:hover {
  border-color: var(--pine);
  box-shadow: 0 12px 25px rgba(31, 90, 74, 0.11);
  transform: translateY(-3px);
}

.feature-tile span {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.feature-tile h3 {
  margin: 8px 0 5px;
  font-size: 16px;
}

.feature-tile p {
  margin: 0;
  font-size: 12px;
}

.machine-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.catalog-search-toolbar {
  grid-template-columns: minmax(0, 1.4fr) minmax(190px, 0.7fr) auto;
}

.filter-tabs {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  padding: 3px 0 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-tab {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #cdbda5;
  border-radius: 999px;
  color: #584b3b;
  background: #fffdf7;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.filter-tab.active {
  border-color: var(--pine-dark);
  color: #fff;
  background: var(--pine);
}

.filter-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--pine-dark);
  background: var(--pine-soft);
  font-size: 10px;
}

.filter-tab.active .filter-count {
  color: var(--pine-dark);
  background: #eaf4ef;
}

.machine-list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.month-switcher {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 440px;
  margin-top: 22px;
}

.month-switcher strong {
  color: var(--pine-dark);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  text-align: center;
}

.month-switcher-link {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 8px 14px;
  border: 1px solid #cdbda5;
  border-radius: 999px;
  color: var(--pine-dark);
  background: #fffdf7;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.record-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(108, 82, 48, 0.24);
  border-radius: 16px 7px 16px 7px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 10px 24px rgba(71, 54, 31, 0.07);
}

.record-summary-card small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
}

.record-summary-card strong {
  font-size: clamp(18px, 2.2vw, 26px);
  overflow-wrap: anywhere;
}

.money-positive {
  color: var(--pine);
}

.money-negative {
  color: var(--brand-dark);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading-row h2,
.section-heading-row p {
  margin-bottom: 0;
}

.section-heading-row > p {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.play-calendar-weekday {
  padding: 8px 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.play-calendar-weekday.sunday {
  color: var(--brand-dark);
}

.play-calendar-weekday.saturday {
  color: #326b8a;
}

.play-calendar-day {
  display: grid;
  min-width: 0;
  min-height: 92px;
  align-content: start;
  gap: 5px;
  padding: 9px;
  border: 1px solid #ddd2c0;
  border-radius: 12px 5px 12px 5px;
  color: var(--ink);
  background: #fffdf8;
  text-decoration: none;
}

.play-calendar-day.outside-month {
  border-color: transparent;
  background: rgba(245, 239, 226, 0.42);
  opacity: 0.35;
}

.play-calendar-day.has-record {
  border-color: rgba(31, 90, 74, 0.44);
  background: #f5fbf8;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.play-calendar-day.has-record:hover {
  box-shadow: 0 9px 20px rgba(31, 90, 74, 0.12);
  transform: translateY(-2px);
}

.play-calendar-day.selected {
  outline: 3px solid rgba(216, 70, 42, 0.24);
  border-color: var(--brand);
}

.play-calendar-day.loss-day {
  border-color: rgba(181, 52, 35, 0.35);
  background: #fff8f4;
}

.play-calendar-date {
  font-size: 12px;
  font-weight: 900;
}

.play-calendar-day strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.play-calendar-day.loss-day strong {
  color: var(--brand-dark);
}

.play-calendar-day.win-day strong {
  color: var(--pine);
}

.play-calendar-day strong small {
  font-size: 9px;
}

.play-calendar-day > span:last-child,
.no-record-label {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.compact-empty-state {
  margin-bottom: 18px;
  padding: 18px;
}

.compact-empty-state p {
  margin-bottom: 0;
}

.session-record-list {
  display: grid;
  gap: 12px;
}

.session-record-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d7c9b2;
  border-radius: 16px 7px 16px 7px;
  background: #fffdf8;
}

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

.session-record-head small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
}

.session-record-head h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.session-record-head > strong {
  font-size: 20px;
  white-space: nowrap;
}

.record-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.record-money-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f5f0e5;
}

.record-money-grid small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
}

.record-money-grid strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.session-record-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.session-record-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--pine-dark);
  background: var(--pine-soft);
  font-size: 10px;
  font-weight: 900;
}

.session-record-memo {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed #d8cab3;
  white-space: pre-wrap;
}

.session-record-actions {
  display: flex;
  justify-content: flex-end;
}

.inline-action-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #b7a78e;
  border-radius: 999px;
  color: var(--pine-dark);
  background: #fffdf7;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.record-form {
  display: grid;
  gap: 18px;
}

.record-form-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(108, 82, 48, 0.25);
  border-radius: 18px 8px 18px 8px;
  background: rgba(255, 250, 240, 0.93);
  box-shadow: 0 18px 42px rgba(67, 48, 26, 0.11);
}

.record-form-section h2,
.danger-zone h2 {
  margin: 0 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.record-form-section p,
.danger-zone p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.record-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.record-form-textarea {
  min-height: 130px;
  resize: vertical;
}

.record-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-errors {
  padding: 16px 18px;
  border: 1px solid #dfa38e;
  border-radius: 14px;
  color: var(--warning);
  background: var(--warning-soft);
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(181, 52, 35, 0.32);
  border-radius: 18px 8px 18px 8px;
  background: #fff4ef;
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.machine-card {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: 18px;
  border: 1px solid #d0c0a8;
  border-radius: 18px 7px 18px 7px;
  color: inherit;
  background: #fffdf8;
  box-shadow: 0 8px 20px rgba(67, 48, 26, 0.06);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.machine-card:hover {
  border-color: var(--pine);
  box-shadow: 0 15px 30px rgba(31, 90, 74, 0.13);
  transform: translateY(-3px);
}

.machine-select-card.selected {
  border-color: var(--brand);
  background: #fff7f1;
  box-shadow: 0 15px 30px rgba(216, 70, 42, 0.13);
}

.machine-select-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.machine-select-control input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--brand);
}

.machine-title-link {
  color: inherit;
  text-decoration: none;
}

.machine-title-link:hover {
  color: var(--pine-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.machine-card-actions {
  display: flex;
  justify-content: flex-end;
}

.bulk-delete-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin-bottom: 18px;
  border-color: rgba(181, 52, 35, 0.32);
  background: #fff8f4;
}

.bulk-delete-controls {
  display: grid;
  align-content: center;
  gap: 12px;
}

.bulk-delete-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.machine-card h2,
.machine-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  line-height: 1.5;
}

.mode-chip {
  display: inline-flex;
  min-height: 25px;
  flex: 0 0 auto;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--pine-dark);
  background: var(--pine-soft);
  font-size: 10px;
  font-weight: 900;
}

.machine-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.machine-meta-item {
  min-width: 0;
  padding: 9px;
  border-radius: 10px;
  background: #f5eee2;
}

.machine-meta-item small {
  display: block;
  margin-bottom: 3px;
  color: #776a59;
  font-size: 9px;
  font-weight: 900;
}

.machine-meta-item strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 42px 20px;
  border: 1px dashed #b9a78b;
  border-radius: 18px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.76);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-grid;
  min-width: 42px;
  min-height: 40px;
  place-items: center;
  padding: 8px 11px;
  border: 1px solid #c8b79c;
  border-radius: 10px;
  background: #fffdf7;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.pagination span {
  border-color: var(--pine);
  color: #fff;
  background: var(--pine);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.detail-item {
  min-width: 0;
  padding: 13px;
  border: 1px solid #d4c5ae;
  border-radius: 12px;
  background: #fffdf8;
}

.detail-item small {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
}

.detail-item strong {
  overflow-wrap: anywhere;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 25, 21, 0.72);
  backdrop-filter: blur(5px);
}

.age-modal {
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid #d9c3a5;
  border-radius: 22px 9px 22px 9px;
  background: var(--surface-strong);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.33);
  animation: modal-in 180ms ease-out both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.age-modal h2 {
  margin: 0 0 9px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 24px;
}

.age-modal p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.age-confirm-box {
  padding: 14px;
  border: 1px solid #d4b7a9;
  border-radius: 13px;
  background: #fff4ef;
}

.modal-error {
  min-height: 20px;
  margin: 9px 0 0;
  color: #a12d1d;
  font-size: 12px;
  font-weight: 900;
}

.modal-actions {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 10px;
  margin-top: 14px;
}

.hidden-form {
  display: none;
}

.beta-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid rgba(104, 80, 48, 0.23);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--pine-dark);
  font-size: 11px;
  font-weight: 800;
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .play-panel {
    min-height: auto;
  }

  .content-grid,
  .feature-list,
  .machine-grid,
  .bulk-delete-panel {
    grid-template-columns: 1fr;
  }

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

  .machine-toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .beta-topbar,
  .admin-preview-strip,
  .beta-main,
  .beta-footer,
  .flash-stack {
    width: calc(100% - 22px);
    max-width: 1160px;
  }

  .beta-topbar {
    padding-top: 13px;
  }

  .admin-preview-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 10px;
  }

  .admin-preview-return {
    width: 100%;
    justify-content: center;
    padding: 7px 10px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
  }

  .brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .brand-copy small,
  .beta-badge {
    display: none;
  }

  .topbar-actions .topbar-link:first-child {
    display: none;
  }

  .auth-stage {
    border-radius: 20px 8px 20px 8px;
  }

  .login-panel,
  .play-panel {
    padding: 24px 18px;
  }

  .login-panel h1 {
    font-size: 36px;
  }

  .login-lead {
    margin-bottom: 22px;
  }

  .play-copy h2 {
    font-size: 28px;
  }

  .account-facts,
  .modal-actions,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .month-switcher {
    grid-template-columns: auto minmax(100px, 1fr) auto;
    gap: 6px;
  }

  .month-switcher-link {
    min-height: 36px;
    padding: 7px 10px;
  }

  .record-summary-grid,
  .record-money-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading-row,
  .session-record-head,
  .danger-zone {
    display: grid;
  }

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

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

  .play-calendar {
    gap: 3px;
  }

  .play-calendar-day {
    min-height: 66px;
    gap: 3px;
    padding: 6px 3px;
    border-radius: 8px 3px 8px 3px;
  }

  .play-calendar-day strong {
    font-size: 9px;
  }

  .play-calendar-day strong small,
  .no-record-label {
    display: none;
  }

  .session-record-head > strong {
    white-space: normal;
  }

  .footer-inner {
    display: grid;
  }
}

@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;
  }
}
