﻿:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --column: #edf5fc;
  --column-line: #c9d8e6;
  --ink: #07172f;
  --muted: #5f6c7c;
  --line: #c8d5e6;
  --blue: #2f94df;
  --blue-dark: #1977c8;
  --yellow: #fff6d8;
  --yellow-line: #e5aa00;
  --visited: #d5dce5;
  --danger: #b42318;
  font-family: "Yu Gothic UI", "Yu Gothic", YuGothic, "Hiragino Sans", "Noto Sans JP", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
}

a {
  color: #0068b7;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}

button.primary,
button.blue,
button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

button.primary:hover,
button.blue:hover {
  background: var(--blue-dark);
}

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

.app-shell {
  min-height: 100vh;
  padding: 44px 0 70px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-box {
  width: min(100%, 360px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(7, 23, 47, 0.08);
}

.login-box p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.login-box label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.login-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  font: inherit;
}

.login-box button {
  width: 100%;
  margin-top: 14px;
}

.login-error {
  margin-top: 10px;
  color: var(--danger);
  font-weight: 700;
}

.editor-frame {
  width: min(100% - 140px, 1640px);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
}

.home-frame {
  width: min(100% - 140px, 980px);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
}

.topbar {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.title-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.lead {
  margin: 5px 0 16px;
  color: #2e4057;
  font-size: 12px;
}

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

.top-actions-spacer {
  flex: 1 1 auto;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 105px;
  color: #2e4057;
}

.save-state::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #6b7787;
}

.save-state.error {
  color: var(--danger);
  font-weight: 700;
}

.save-state.error::before {
  background: var(--danger);
}

.date-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.route-locked .visit-card {
  cursor: default;
}

.route-locked .route-column {
  box-shadow: inset 0 0 0 2px rgba(47, 148, 223, 0.12);
}

.route-locked select:disabled,
.route-locked button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.staff-index-panel {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  overflow-x: auto;
}

.staff-index-row {
  display: grid;
  grid-template-columns: 48px 130px max-content 82px;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  min-width: max-content;
}

.staff-index-name {
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
}

.staff-index-dates {
  display: grid;
  grid-template-columns: repeat(10, 92px);
  gap: 6px;
  color: #2e4057;
}

.staff-index-dates span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 4px;
  border: 1px solid #c7d8ea;
  border-radius: 999px;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.staff-index-dates .empty-date {
  color: #7b8795;
  background: #f4f7fb;
}

.staff-index-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #aebfd4;
  border-radius: 999px;
  background: #eaf3fc;
  color: #0d213f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.all-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.module-button {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 12px;
  padding: 18px;
  text-align: left;
  background: #fff;
}

.module-button strong {
  font-size: 22px;
  line-height: 1.3;
}

.module-button:not(:disabled):hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(47, 148, 223, 0.14);
}

.module-button.coming-soon {
  background: #f4f7fb;
  color: #516075;
}

.module-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #c7d8ea;
  border-radius: 999px;
  background: #fff;
  color: #516075;
  font-size: 11px;
  font-weight: 800;
}

.module-status.active {
  border-color: #8fc4ee;
  background: #eaf4fd;
  color: #0d4f84;
}

.staff-members-frame {
  width: min(100% - 140px, 760px);
}

.staff-members-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.staff-member-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.staff-member-row span {
  color: #2e4057;
}

.staff-member-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.hoji-frame {
  width: min(100% - 80px, 1500px);
}

.hoji-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.hoji-title-actions {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 14px;
}

.hoji-business-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #b9cadc;
  border-radius: 9px;
  background: #f7fbff;
}

.hoji-business-links button {
  min-height: 44px;
  background: #fff;
  border-color: #9fb7d2;
  font-size: 18px;
}

.hoji-business-links button:hover {
  border-color: var(--blue);
  background: #edf7ff;
}

.hoji-business-links button:nth-child(1) {
  border-color: #8ebce2;
  background: #eaf5ff;
  color: #155d91;
}

.hoji-business-links button:nth-child(1):hover {
  border-color: #4d99d1;
  background: #d9edff;
}

.hoji-business-links button:nth-child(2) {
  border-color: #91c7ad;
  background: #edf8f1;
  color: #276749;
}

.hoji-business-links button:nth-child(2):hover {
  border-color: #5da47d;
  background: #def2e6;
}

.hoji-input-button {
  border-color: #d8b078;
  background: #fff5e7;
  color: #86531a;
  min-width: 150px;
  min-height: 46px;
  font-size: 18px;
}

.hoji-input-button:hover {
  border-color: #bd8740;
  background: #ffead0;
}

.hoji-input-frame {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
}

.hoji-input-topbar {
  align-items: center;
}

.hoji-input-form {
  display: grid;
  gap: 18px;
  width: min(100%, 860px);
  margin: 18px auto 0;
  padding: 24px;
  border: 1px solid #b9cadc;
  border-radius: 8px;
  background: #f7fbff;
}

.hoji-input-main-field,
.hoji-input-confirm-field {
  display: grid;
  gap: 8px;
  color: #17324f;
  font-size: 17px;
  font-weight: 700;
}

.hoji-input-main-field textarea,
.hoji-input-confirm-field input {
  width: 100%;
  border: 1px solid #9fb7d2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.hoji-input-main-field textarea {
  min-height: 170px;
  padding: 15px;
  resize: vertical;
  font-size: 18px;
  line-height: 1.7;
}

.hoji-input-confirm-field {
  max-width: 520px;
}

.hoji-input-confirm-field small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.hoji-input-confirm-field input {
  min-height: 46px;
  padding: 8px 12px;
  font-size: 17px;
}

.hoji-input-example {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 4px solid #7baed7;
  background: rgba(226, 240, 252, 0.6);
  color: #30455d;
  font-size: 14px;
  line-height: 1.55;
}

.hoji-input-example strong {
  color: #17324f;
  font-size: 15px;
}

.hoji-input-submit {
  justify-self: start;
  min-height: 48px;
  padding-inline: 24px;
  font-size: 17px;
}

.hoji-input-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.hoji-input-result {
  width: min(100%, 860px);
  margin: 16px auto 0;
  padding: 20px 22px;
  border: 1px solid #d2a52f;
  border-radius: 8px;
  background: #fff8df;
}

.hoji-input-result.success {
  border-color: #70b28c;
  background: #edf8f1;
}

.hoji-input-result h2 {
  margin: 0;
  font-size: 21px;
}

.hoji-input-result > p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
}

.hoji-input-result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0 0;
  overflow: hidden;
  border: 1px solid #b8d4c3;
  border-radius: 7px;
  background: #b8d4c3;
}

.hoji-input-result-details > div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  background: #fff;
}

.hoji-input-result-details dt,
.hoji-input-result-details dd {
  margin: 0;
  padding: 10px;
  font-size: 15px;
}

.hoji-input-result-details dt {
  background: #f1f8f4;
  font-weight: 700;
}

.hoji-input-result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.hoji-input-result-actions a {
  padding: 8px 4px;
  font-size: 14px;
}

.hoji-input-candidates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.hoji-input-candidates button {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.hoji-input-candidates button span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hoji-input-sync-warning {
  color: #8a3b12;
  font-weight: 700;
}

.hoji-sync-message {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #9fc2e6;
  border-radius: 7px;
  background: #edf7ff;
  color: #15324f;
  font-weight: 700;
  white-space: pre-line;
}

.hoji-sync-warnings {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dfa826;
  border-radius: 7px;
  background: #fff8df;
  color: #3b2a06;
}

.hoji-sync-warnings-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.hoji-sync-warnings-head span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1c44c;
  font-size: 13px;
  font-weight: 800;
}

.hoji-sync-warnings p {
  margin: 5px 0 8px;
  font-size: 14px;
}

.hoji-sync-warnings ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hoji-sync-warnings li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #ead9a6;
}

.hoji-sync-warnings li button,
.hoji-warning-date {
  justify-self: start;
  font-weight: 800;
}

.hoji-sync-warnings li button {
  color: #075fae;
  text-decoration: underline;
  background: transparent;
  border: 0;
  padding: 2px 0;
}

.reference-shell {
  padding-top: 32px;
}

.reference-frame {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
}

.reference-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.reference-topbar .lead {
  margin-bottom: 0;
  font-size: 14px;
}

.reference-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 9px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7fbff;
}

.reference-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 17px;
}

.reference-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 0 2px;
  font-size: 15px;
}

.reference-search-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid #b9cadc;
  border-radius: 7px;
  background: #edf4fa;
}

.reference-search-modes button {
  min-height: 40px;
  padding: 7px 18px;
  border-color: transparent;
  background: transparent;
  font-weight: 800;
}

.reference-search-modes button.selected {
  border-color: #8bb9df;
  background: #fff;
  color: #075f9f;
  box-shadow: 0 1px 4px rgba(7, 23, 47, 0.12);
}

.reference-result-head span {
  color: var(--muted);
  font-weight: 700;
}

.reference-source-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid #c8d8e8;
  border-radius: 7px;
  background: #f5f9fd;
  color: #42556b;
  font-size: 13px;
  font-weight: 700;
}

.reference-source-status strong {
  color: var(--ink);
}

.reference-source-status.missing {
  border-color: #d8af54;
  background: #fff8df;
  color: #5b4108;
}

.reference-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}

.reference-result {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.reference-result:hover {
  border-color: var(--blue);
  background: #f6fbff;
}

.reference-result.danka-reference-result {
  border-color: #bfd5e8;
  background: #f2f8fd;
}

.reference-result.danka-reference-result:hover {
  border-color: #82afd3;
  background: #eaf4fc;
}

.reference-result span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #34465d;
}

.reference-result .reference-result-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.reference-result-address {
  position: relative;
  z-index: 1;
  color: #0068b7 !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reference-result-address.missing {
  color: #66758a !important;
  text-decoration: none;
}

.reference-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.reference-fields > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-width: 0;
  border-bottom: 1px solid #d9e2ed;
}

.reference-fields > div:nth-child(odd) {
  border-right: 1px solid #d9e2ed;
}

.reference-fields dt,
.reference-fields dd {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.reference-fields dt {
  background: #edf5fc;
  color: #33465d;
  font-weight: 800;
}

.reference-fields dd {
  font-size: 14px;
  font-weight: 700;
}

.reference-fields.compact {
  grid-template-columns: 1fr;
  margin-top: 10px;
  border-radius: 6px;
}

.reference-fields.compact > div:nth-child(odd) {
  border-right: 0;
}

.kakocho-records {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.danka-kakocho-section {
  margin-top: 22px;
}

.danka-kakocho-section > header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.danka-kakocho-section h2 {
  margin: 0;
  font-size: 21px;
}

.danka-kakocho-section > header span {
  color: var(--muted);
  font-weight: 700;
}

.kakocho-record {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5fbf6;
}

.kakocho-record > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #d9e2ed;
}

.kakocho-record > header strong {
  font-size: 19px;
}

.kakocho-record > header span,
.kakocho-posthumous {
  font-size: 14px;
  font-weight: 700;
}

.kakocho-posthumous {
  margin-top: 9px;
}

.kakocho-summary {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
}

.kakocho-search-household {
  display: block;
  width: 100%;
  padding: 0 4px 3px;
  color: #2e435c !important;
  font-size: 16px;
  font-weight: 500;
}

.kakocho-summary > div {
  min-width: 0;
}

.kakocho-summary span {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 3px 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.kakocho-summary .posthumous-name span {
  font-size: 22px;
  font-weight: 700;
}

.kakocho-summary .death-date span {
  font-weight: 500;
}

.kakocho-summary .secondary-line {
  display: block;
  padding: 3px 4px;
}

.kakocho-summary .secondary-line span {
  display: inline;
  padding: 0;
  color: #35475d;
  font-size: 14px;
  font-weight: 500;
}

.kakocho-summary .secondary-line span + span::before {
  content: "　";
}

.reference-result.kakocho-name-result {
  padding: 8px 10px;
  gap: 2px;
  border-color: #b9d8bf;
  background: #f5fbf6;
}

.reference-result.kakocho-name-result:hover {
  border-color: #78ad83;
  background: #edf8ef;
}

.reference-result.kakocho-household-result {
  border-color: #bfd5e8;
  background: #f2f8fd;
}

.reference-result.kakocho-household-result:hover {
  border-color: #82afd3;
  background: #eaf4fc;
}

.reference-guide,
.reference-notice {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 700px) {
  .hoji-sync-warnings li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.hoji-calendar {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #b9cadc;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6fc 100%);
  box-shadow: 0 8px 18px rgba(7, 23, 47, 0.05);
}

.hoji-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hoji-calendar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.hoji-calendar select {
  width: 132px;
  height: 42px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  padding: 6px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.hoji-calendar-sync-button {
  min-height: 46px;
  border-color: #8ebce2;
  background: #eaf5ff;
  color: #155d91;
  font-size: 16px;
}

.hoji-calendar-sync-button:hover {
  border-color: #4d99d1;
  background: #d9edff;
}

.month-tabs {
  display: grid;
  grid-template-columns: repeat(12, minmax(58px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.month-tabs button {
  min-height: 40px;
  border-color: #b5c8dc;
  background: #ffffff;
  color: #21324a;
  font-size: 15px;
}

.month-tabs button.selected,
.day-tabs button.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #b8c9dc;
  border-radius: 9px;
  background: #b8c9dc;
}

.weekday-head {
  display: grid;
  min-height: 30px;
  place-items: center;
  background: #fff;
  color: #33455c;
  font-weight: 800;
}

.weekday-head:nth-child(7) {
  background: #e9f3ff;
  color: #23609e;
}

.weekday-head:nth-child(1) {
  background: #ffe6e4;
  color: #b23b34;
}

.day-blank {
  min-height: 98px;
  background: #eef3f8;
}

.day-tabs button {
  min-height: 98px;
  display: grid;
  gap: 5px;
  align-content: center;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #172338;
  box-shadow: none;
}

.day-tabs button.has-events {
  background: #f2fbef;
}

.day-tabs button.saturday {
  background: #e9f3ff;
  color: #172338;
}

.day-tabs button.sunday {
  background: #ffefed;
  color: #172338;
}

.day-tabs button.saturday.has-events {
  background: #e1f0ff;
}

.day-tabs button.sunday.has-events {
  background: #ffe8e4;
}

.day-tabs button.today {
  box-shadow: inset 0 0 0 2px #f0b429;
}

.day-tabs button.selected,
.day-tabs button.selected.has-events,
.day-tabs button.saturday.selected,
.day-tabs button.sunday.selected {
  background: #2f94df;
  color: #fff;
  box-shadow: inset 0 0 0 2px #1977c8;
}

.day-tabs button:hover {
  background: #eaf5ff;
}

.day-tabs button.selected:hover {
  background: #1977c8;
}

.day-tabs strong {
  font-size: 30px;
}

.day-tabs button.saturday:not(.selected) .calendar-day-number {
  color: #1763a5;
}

.day-tabs button.sunday:not(.selected) .calendar-day-number {
  color: #b63b34;
}

.calendar-day-count {
  color: inherit;
  font-size: 11px;
  padding-block: 3px;
}

.calendar-day-count-compact {
  display: none;
}

.calendar-day-staff {
  display: grid;
  grid-template-columns: repeat(var(--calendar-staff-count, 4), minmax(0, 1fr));
  container-type: inline-size;
  width: 100%;
  margin-block: 2px 1px;
  gap: 2px;
  min-height: 22px;
  box-sizing: border-box;
  border: 1px solid #c3d1df;
  border-radius: 5px;
  padding: 2px;
  background: rgb(220 230 240 / 18%);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.calendar-staff-person {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 16px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 3px;
  padding: 2px 1px;
  font-size: clamp(8px, 11cqw, 10px);
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.calendar-staff-person.attending {
  border: 1px solid #aebfd0;
  background: #fff;
  color: #17334e;
  box-shadow: 0 1px 1px rgb(22 50 76 / 8%);
}

.calendar-staff-person.off {
  visibility: hidden;
}

.day-tabs button.selected .calendar-day-staff {
  border-color: rgb(255 255 255 / 70%);
  background: rgb(255 255 255 / 20%);
}

.day-tabs button.selected .calendar-staff-person.attending {
  border-color: #fff;
  background: #fff;
  color: #155888;
  box-shadow: none;
}

.calendar-staff-name-compact {
  display: none;
}

.hoji-day-attendance {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #b9cadc;
  border-radius: 9px;
  background: #f7fbfe;
}

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

.hoji-day-attendance-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.hoji-day-attendance-heading strong {
  font-size: 17px;
}

.hoji-day-attendance-heading span {
  color: #53657a;
  font-size: 13px;
}

@media (min-width: 761px) {
  .hoji-topbar h1 {
    font-size: 28px;
  }

  .hoji-calendar select {
    height: 46px;
    font-size: 20px;
  }

  .month-tabs button {
    min-height: 44px;
    font-size: 18px;
  }

  .calendar-day-number {
    font-size: 42px;
  }

  .calendar-day-count {
    font-size: 14px;
    font-weight: 700;
  }

  .hoji-day-attendance-heading strong {
    font-size: 21px;
  }

  .hoji-day-attendance .hoji-day-attendance-list {
    gap: 12px 22px;
  }

  .hoji-day-attendance .hoji-day-person {
    height: 40px;
    min-height: 40px;
  }

  .hoji-day-attendance .hoji-day-attending-button {
    padding-inline: 14px;
    font-size: 17px;
  }

  .hoji-day-attendance .hoji-day-part-buttons button {
    padding-inline: 9px;
    font-size: 12px;
  }
}

.hoji-assignment-confirm-button {
  flex: 0 0 auto;
  min-width: 126px;
  min-height: 28px;
  border-width: 1px;
  border-style: solid;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hoji-assignment-confirm-button.unconfirmed {
  border-color: #c8952d;
  background: #fff8e7;
  color: #76530d;
}

.hoji-assignment-confirm-button.confirmed {
  border-color: #2272aa;
  background: #2f91d4;
  color: #fff;
}

.hoji-day-attendance-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.hoji-day-person {
  display: flex;
  align-items: center;
  gap: 0;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid #c4d1df;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  color: #647080;
}

.hoji-day-person.attending {
  border-color: #88b9df;
  color: #102c49;
}

.attendance-status-button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid #aab9c8;
  border-radius: 6px;
  padding: 4px 9px;
  background: #fff;
  color: #687586;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.attendance-status-button.active {
  border-color: #2388ce;
  background: #3198db;
  color: #fff;
}

.hoji-day-attending-button {
  flex: 1 1 auto;
  align-self: stretch;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding-block: 2px;
}

.hoji-day-part-buttons {
  display: flex;
  align-self: stretch;
  height: auto;
  gap: 0;
}

.hoji-day-part-buttons button {
  height: 100%;
  min-height: 0;
  border: 0;
  border-left: 1px solid #b8c7d6;
  border-radius: 0;
  padding: 2px 6px;
  font-size: 10px;
}

.hoji-day-part-buttons button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.hoji-routes-scroll {
  width: 100%;
  margin-top: 12px;
  overflow-x: hidden;
  padding-bottom: 14px;
}

.hoji-mobile-sticky-heads {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  width: 100%;
  margin-top: 12px;
  overflow-x: hidden;
  border: 1px solid var(--column-line);
  border-radius: 10px;
  background: var(--column);
  scrollbar-width: none;
}

.hoji-mobile-sticky-heads::-webkit-scrollbar {
  display: none;
}

.hoji-mobile-sticky-track {
  display: grid;
  grid-template-columns: repeat(var(--hoji-column-count, 1), minmax(0, 300px));
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.6vw, 28px);
  width: 100%;
  min-width: 0;
}

.hoji-mobile-staff-head {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 61px;
  box-sizing: border-box;
  padding: 10px;
  color: #0d213f;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
}

.hoji-mobile-staff-head select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 40px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: #0d213f;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-align-last: center;
}

.hoji-routes {
  display: grid;
  grid-template-columns: repeat(var(--hoji-column-count, 1), minmax(0, 300px));
  justify-content: center;
  gap: clamp(6px, 1.6vw, 28px);
  align-items: start;
  width: 100%;
  min-width: 0;
}

.hoji-column {
  width: 100%;
  min-width: 0;
  min-height: 540px;
  border: 1px solid var(--column-line);
  border-radius: 10px 10px 0 0;
  background: var(--column);
  container-type: inline-size;
}

.hoji-routes .hoji-column-head {
  display: none;
}

.hoji-column-head {
  position: sticky;
  top: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  height: 57px;
  box-sizing: border-box;
  padding: 10px;
  border-bottom: 1px solid var(--column-line);
  background: var(--column);
  border-radius: 10px 10px 0 0;
  color: #0d213f;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
}

.hoji-column-head select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 36px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: #0d213f;
  font-size: 15px;
  font-weight: 700;
}

.hoji-column-drag-handle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  background: #fff;
  color: #34506f;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

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

.hoji-column-drag-handle.disabled {
  border-color: #cbd5df;
  background: #edf1f5;
  color: #8795a5;
  cursor: default;
  touch-action: auto;
}

.hoji-column.column-drag-source,
.hoji-mobile-staff-head.column-drag-source {
  display: none;
}

.hoji-column-placeholder {
  width: 100%;
  min-width: 0;
  min-height: 540px;
  box-sizing: border-box;
  border: 3px dashed var(--blue);
  border-radius: 10px;
  background: rgba(47, 148, 223, 0.1);
}

.hoji-mobile-head-placeholder {
  width: 100%;
  min-width: 0;
  height: 57px;
  box-sizing: border-box;
  border: 3px dashed var(--blue);
  border-radius: 8px;
  background: rgba(47, 148, 223, 0.12);
}

.hoji-column-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 14px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 55, 82, 0.25);
  color: #0d213f;
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
}

body.hoji-column-drag-active {
  cursor: grabbing;
  user-select: none;
}

.hoji-time-grid {
  position: relative;
  display: grid;
  grid-template-rows: repeat(14, 120px);
  min-height: 1680px;
  padding-left: 48px;
  background: #fff;
}

.hoji-hour-row {
  position: relative;
  border-bottom: 1px solid #d8e2ee;
  background: rgba(255, 255, 255, 0.82);
}

.hoji-hour-row > span {
  position: absolute;
  left: -42px;
  top: 7px;
  width: 34px;
  color: #516075;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.hoji-hour-row.off {
  background: #fff1ca;
}

.hoji-hour-row.off strong {
  position: absolute;
  left: 8px;
  top: 8px;
  color: #725012;
  font-size: 11px;
}

.hoji-period {
  padding: 9px;
  border-bottom: 1px solid #d5e1ef;
}

.hoji-period-label {
  margin: 0 0 7px;
  color: #33516f;
  font-size: 12px;
  font-weight: 800;
}

.hoji-event-list {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  gap: 10px;
}

.hoji-period.off {
  min-height: 148px;
}

.hoji-rest-block {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px solid #e1b35c;
  border-radius: 8px;
  background: #fff1ca;
  color: #725012;
  font-size: 16px;
  font-weight: 800;
}

.hoji-card {
  position: absolute;
  left: 56px;
  right: 8px;
  background: var(--surface);
  border: 1px solid #9fb2ca;
  border-radius: 9px;
  padding: 11px 10px 9px;
  cursor: grab;
  box-shadow: 0 2px 5px rgba(31, 55, 82, 0.16);
  overflow: hidden;
  z-index: 2;
}

.hoji-card.assignment-locked {
  cursor: default;
  touch-action: pan-y;
}

.assignments-locked .hoji-day-person,
.assignments-locked .hoji-mobile-staff-head,
.assignments-locked .hoji-column-head {
  background-color: #f1f5f8;
}

.assignments-locked select:disabled,
.assignments-locked button:disabled,
.assignments-locked input:disabled {
  opacity: 0.78;
}

.hoji-card-monthly {
  background: #fff;
}

.hoji-card-time-fixed {
  border-left: 4px solid #2a78b8;
}

.hoji-card-time-range {
  border-left: 4px solid #7398b8;
}

.hoji-time-constraint-label {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 4px;
  border: 1px solid #8eabc4;
  border-radius: 4px;
  background: #edf6fd;
  color: #275d88;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: 1px;
}

.hoji-card-home {
  border-color: #dca9b2;
  background: #fff0f3;
}

.hoji-card-hondo {
  border-color: #75a9d4;
  background: #d9edff;
}

.hoji-card-hondo.hoji-card-copy {
  border-color: #4f8fbe;
  background: #c5e2f7;
  box-shadow: 0 2px 6px rgba(25, 91, 138, 0.24);
}

.hoji-card-grave {
  border-color: #a7c9a0;
  background: #eff9ed;
}

.hoji-card.dragging {
  opacity: 0.45;
}

.hoji-card.hoji-touch-drag-source {
  opacity: 0.3;
}

.hoji-touch-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  margin: 0;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 14px 30px rgba(31, 55, 82, 0.3);
  container-type: inline-size;
}

.hoji-touch-drag-card {
  margin: 0;
}

.hoji-drop-preview {
  z-index: 3;
  border-width: 2px;
  border-style: dashed;
  outline: 2px dashed #1682c4;
  outline-offset: 3px;
  opacity: 0.48;
  pointer-events: none;
}

.hoji-drop-preview-label {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #145f96;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.hoji-time-grid.touch-drop-target {
  background-color: #f7fbfe;
}

.hoji-column.touch-drop-target-column {
  border-color: #a9d1ed;
  outline: 2px solid #b9dcf2;
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(114, 179, 222, 0.12);
}

.hoji-mobile-staff-head.touch-drop-target-head {
  border-radius: 8px;
  background: #eaf6fd;
  box-shadow: inset 0 0 0 2px #b9dcf2;
}

body.hoji-card-drag-active {
  cursor: grabbing;
  user-select: none;
}

.hoji-card-time {
  margin-bottom: 7px;
  color: #0065b5;
  font-size: 14px;
  font-weight: 800;
}

.hoji-card-time-compact {
  display: none;
}

.hoji-card .name {
  font-size: 17px;
}

.hoji-card .card-line {
  font-size: 12px;
}

.hoji-card .address-line {
  font-size: 14px;
}

.hoji-card .phone-line {
  font-size: 13px;
}

@container (max-width: 260px) {
  .hoji-column-head {
    gap: 5px;
    padding: 7px;
  }

  .hoji-column-head select {
    padding-inline: 5px;
    font-size: 13px;
  }

  .hoji-column-drag-handle {
    flex-basis: 30px;
    width: 30px;
  }

  .hoji-time-grid {
    padding-left: 38px;
  }

  .hoji-hour-row > span {
    left: -35px;
    width: 30px;
    font-size: 12px;
  }

  .hoji-card {
    left: 4px;
    right: 5px;
    padding: 8px 7px 7px;
  }

  .hoji-card-time {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .hoji-card .card-name-row {
    gap: 3px;
    padding-bottom: 4px;
  }

  .hoji-card .name {
    font-size: 14px;
  }

  .hoji-card .card-line {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.25;
  }

  .hoji-card .address-line {
    font-size: 12px;
  }

  .hoji-card .phone-line {
    display: none;
  }
}

@container (max-width: 160px) {
  .hoji-time-grid {
    padding-left: 27px;
  }

  .hoji-hour-row > span {
    left: -27px;
    width: 27px;
    font-size: 11px;
  }

  .hoji-card {
    left: 3px;
    right: 3px;
    padding: 6px 5px 5px;
    border-radius: 6px;
  }

  .hoji-card-time-full {
    display: none;
  }

  .hoji-card-time-compact {
    display: inline;
  }

  .hoji-card-time {
    margin-bottom: 3px;
    font-size: 10px;
    white-space: nowrap;
  }

  .hoji-card.duplicatable .hoji-card-time {
    padding-right: 0;
  }

  .hoji-card .card-name-row {
    display: block;
    padding-bottom: 3px;
  }

  .hoji-card .name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hoji-card .tag {
    display: none;
  }

  .hoji-card .card-line {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hoji-card .address-line {
    font-size: 10px;
  }

  .hoji-card .phone-line {
    display: none;
  }

  .hoji-duplicate-button {
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    font-size: 13px;
    line-height: 16px;
  }
}

.hoji-card.duplicatable .hoji-card-time {
  padding-right: 27px;
}

.hoji-card.duplicatable .card-name-row {
  padding-right: 27px;
}

.hoji-card-person-name,
.hoji-card-content {
  display: block;
}

.hoji-card-person-name {
  font-weight: 800;
}

.hoji-card-content {
  margin-top: 2px;
  font-weight: 700;
}

.hoji-address-link {
  display: block;
  color: #005eaa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hoji-address-link:hover {
  color: #003f75;
}

.hoji-duplicate-button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #7198bd;
  border-radius: 50%;
  background: #fff;
  color: #075f9f;
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
  cursor: pointer;
}

.hoji-duplicate-button:hover {
  background: #eaf5ff;
}

.hoji-remove-duplicate-button {
  border-color: #477ea8;
  background: #edf7ff;
  color: #174f79;
}

.hoji-remove-duplicate-button:hover {
  background: #d9ecfa;
}

@container (max-width: 160px) {
  .hoji-card.duplicatable .hoji-card-time,
  .hoji-card.duplicatable .card-name-row {
    padding-right: 22px;
  }

  .hoji-duplicate-button {
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    font-size: 13px;
    line-height: 16px;
  }
}

.empty.compact {
  padding: 18px 10px;
  text-align: center;
}

.attendance-frame {
  width: min(100% - 80px, 1200px);
}

.attendance-table-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 180px);
  background: #fff;
}

.attendance-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.attendance-table th,
.attendance-table td {
  border: 1px solid #b9c7d6;
  padding: 9px 8px;
  vertical-align: top;
}

.attendance-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dcecf8;
  font-size: 16px;
}

.attendance-table tr > * + * {
  border-left: 0;
}

.attendance-table tbody th.saturday {
  background: #dcecff;
  color: #23609e;
}

.attendance-table tbody th.sunday {
  background: #ffe6e4;
  color: #b23b34;
}

.attendance-table tbody th {
  min-width: 88px;
  white-space: nowrap;
  background: #f5f8fb;
  font-size: 15px;
}

.attendance-table td.full-off {
  background: #f0f2f5;
}

.attendance-part-buttons {
  display: flex;
  align-self: stretch;
  gap: 0;
  margin-top: 0;
  flex: none;
}

.attendance-person {
  display: grid;
  grid-template-columns: minmax(68px, 96px) auto;
  align-items: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  border: 1px solid #aab9c8;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  white-space: nowrap;
}

.attendance-full-button {
  width: 100%;
  align-self: stretch;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-part-buttons button {
  min-width: 42px;
  border: 0;
  border-left: 1px solid #b8c7d6;
  border-radius: 0;
  padding-inline: 7px;
}

.staff-member-row {
  grid-template-columns: 48px minmax(120px, 1fr) auto;
}

.staff-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.staff-member-row .staff-enabled input {
  width: 22px;
  height: 22px;
}

.all-day-button {
  min-height: 82px;
  display: grid;
  gap: 5px;
  align-content: center;
  text-align: center;
}

.all-day-button strong {
  font-size: 23px;
}

.all-day-button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wide-list-frame {
  width: calc(100vw - 56px);
  max-width: 1800px;
}

.list-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.household-table-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 180px);
  background: #fff;
}

.household-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.household-table th,
.household-table td {
  border: 1px solid #b9c7d6;
  padding: 9px 8px;
  white-space: nowrap;
  vertical-align: top;
}

.household-table th:nth-child(2),
.household-table th:nth-child(3),
.household-table td:nth-child(2),
.household-table td:nth-child(3) {
  text-align: center;
  min-width: 54px;
}

.household-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dcecf8;
  text-align: center;
  font-weight: 700;
}

.household-table tbody td {
  height: 46px;
}

.household-table th:nth-child(4),
.household-table td:nth-child(4) {
  min-width: 150px;
}

.household-table th:nth-child(5),
.household-table td:nth-child(5) {
  width: 1%;
}

.household-table th:nth-child(11),
.household-table td:nth-child(11) {
  width: 1%;
}

.household-table th:nth-child(12),
.household-table td:nth-child(12),
.household-table th:nth-child(13),
.household-table td:nth-child(13) {
  width: 1%;
}

.household-table td:nth-child(4),
.household-table td:nth-child(5),
.household-table td:nth-child(11) {
  font-size: 14px;
}

.household-table td:nth-child(6),
.household-table td:nth-child(7),
.household-table td:nth-child(10) {
  white-space: normal;
  min-width: 180px;
  max-width: 360px;
}

.household-table tr.hope-row {
  background: #dff0d9;
}

.household-table tr.declined-row {
  background: #ececec;
  color: #617080;
}

.household-check {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.household-field {
  width: 100%;
  min-width: 110px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  min-height: 32px;
  padding: 6px 7px;
  color: var(--ink);
  font: inherit;
}

.household-readonly {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 2px;
}

.household-name {
  font-size: 14px;
  font-weight: 700;
}

.household-field.important-field {
  font-size: 14px;
  font-weight: 700;
}

.household-field.compact-field {
  min-width: 0;
  width: auto;
}

.household-field[data-field="郵便番号"] {
  width: 11ch;
}

.household-field[data-field="電話番号"] {
  width: 15ch;
}

.household-field[data-field="確定緯度"],
.household-field[data-field="確定経度"] {
  width: 20ch;
}

.household-field:hover,
.household-field:focus {
  border-color: var(--blue);
  background: #fff;
  outline: none;
}

textarea.household-field {
  min-width: 220px;
  min-height: 30px;
  resize: vertical;
  line-height: 1.5;
}

.date-tab {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 8px 13px;
  border-color: #aebfd4;
  text-align: center;
}

.date-tab.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.date-tab strong {
  display: block;
  font-size: 23px;
  line-height: 1.1;
}

.date-tab-status {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.date-tab-counts {
  display: grid;
  gap: 2px;
  justify-self: end;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.routes-scroll {
  width: 100%;
  margin-top: 12px;
  overflow-x: visible;
  padding-bottom: 14px;
}

.routes {
  display: grid;
  grid-template-columns: repeat(4, 320px);
  justify-content: space-evenly;
  gap: 12px;
  align-items: start;
  min-width: max-content;
}

.route-column {
  background: var(--column);
  border: 1px solid var(--column-line);
  border-radius: 10px 10px 0 0;
  min-height: 560px;
  overflow: visible;
}

.route-head {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 10px 10px 9px;
  border-bottom: 1px solid var(--column-line);
  background: var(--column);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 3px 8px rgba(31, 55, 82, 0.08);
}

.route-slot-label {
  margin-bottom: 7px;
  color: #0d213f;
  font-size: 16px;
  font-weight: 800;
}

.route-tools {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 5px;
  align-items: center;
}

.route-tools select {
  min-width: 0;
  height: 36px;
  border: 1px solid #9fb2ca;
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: #0d213f;
  font-size: 15px;
  font-weight: 700;
}

.route-tools button {
  height: 36px;
  padding: 0;
  font-size: 11px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.route-meta {
  margin: 8px 0 9px;
  color: #0d213f;
  font-size: 13px;
  font-weight: 700;
}

.map-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.stop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 9px;
  min-height: 440px;
}

.visit-card {
  position: relative;
  width: 300px;
  background: var(--surface);
  border: 1px solid #9fb2ca;
  border-radius: 9px;
  padding: 11px 10px 9px;
  cursor: grab;
  box-shadow: 0 2px 5px rgba(31, 55, 82, 0.16);
}

.visit-card.selectable .card-name-row {
  padding-right: 28px;
}

.visit-card.editor-selected {
  border-color: var(--blue);
  background: #f6fbff;
  box-shadow: 0 0 0 3px rgba(47, 148, 223, 0.2), 0 2px 7px rgba(31, 55, 82, 0.2);
}

.visit-card.hatsubon {
  background: var(--yellow);
  border-color: var(--yellow-line);
  border-left-width: 4px;
}

.visit-card.hatsubon.editor-selected {
  background: #fff3bd;
  border-color: var(--blue);
}

.visit-card.visited {
  background: var(--visited);
  opacity: 0.72;
  filter: grayscale(0.2);
}

.visit-card.dragging {
  opacity: 0.35;
}

.visit-card.dragging-lead {
  opacity: 0.55;
}

.card-select {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #b9cbe0;
  cursor: pointer;
}

.card-select input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.card-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d1dbe8;
}

.order {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8f0f8;
  color: #33516f;
  font-weight: 700;
  flex: none;
}

.name {
  min-width: 0;
  flex: 1;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tag {
  border: 1px solid #c09300;
  background: #fff9d9;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.card-line {
  margin-top: 6px;
  line-height: 1.35;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.address-line {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.phone-line {
  font-size: 12px;
}

.eta {
  margin-top: 6px;
  color: #06152a;
  font-size: 12px;
  font-weight: 700;
}

.eta-pair {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: #06152a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.eta-pair span:last-child {
  color: #0065b5;
  text-align: right;
}

.desired {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 7px;
  border: 1px solid #9cc8f4;
  border-radius: 7px;
  background: #edf7ff;
  color: #06152a;
  font-size: 11px;
  font-weight: 700;
}

.note {
  color: #6a7686;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid #d1dbe8;
}

.card-actions button {
  min-width: 0;
  height: 26px;
  padding: 0 5px;
  font-size: 10px;
}

.share-dialog {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 45, 0.38);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
}

.share-box {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(31, 55, 82, 0.18);
}

.share-box h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.share-box textarea {
  width: 100%;
  min-height: 130px;
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.mobile-page {
  min-height: 100vh;
  padding: 44px 0 70px;
  background: #fff;
}

.mobile-route {
  width: 430px;
  max-width: calc(100vw - 28px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: #edf5fc;
}

.staff-index-route {
  border-radius: 14px;
}

.staff-day-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--column);
}

.staff-day-button {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid #aebfd4;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(31, 55, 82, 0.08);
}

.staff-day-button strong {
  font-size: 20px;
}

.staff-day-button span {
  color: #2e4057;
  font-size: 13px;
}

.staff-day-button.expired {
  background: #f1f3f6;
  color: #647285;
}

.staff-day-button em {
  font-style: normal;
  color: var(--danger);
  font-weight: 700;
}

.mobile-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 16px 16px 15px;
}

.mobile-date {
  display: block;
  margin-bottom: 6px;
  color: #1678d4;
  font-size: 13px;
  font-weight: 700;
}

.mobile-head h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.mobile-meta {
  margin-top: 10px;
  color: #18304c;
  font-size: 12px;
  font-weight: 700;
}

.mobile-map {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mobile-back {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 1px solid #9fb2ca;
  border-radius: 8px;
  background: #fff;
  color: #18304c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.mobile-head-actions {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 8px;
  margin-top: 15px;
}

.mobile-head-actions button {
  height: 42px;
}

.route-fixed-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border: 1px solid #9fb2ca;
  border-radius: 8px;
  background: #f1f5f9;
  color: #33516f;
  font-weight: 700;
}

.edit-guide {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #9cc8f4;
  border-radius: 8px;
  background: #edf7ff;
  color: #18304c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.mobile-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 20px 28px;
}

.mobile-list .visit-card {
  box-sizing: border-box;
  width: min(318px, 100%);
  cursor: default;
  padding: 12px 12px 11px;
}

.mobile-route.edit-mode .visit-card {
  cursor: pointer;
  touch-action: pan-y;
}

.mobile-route.edit-mode .visit-card.selected-for-move {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 148, 223, 0.22);
}

.mobile-route.edit-mode .visit-card.touch-dragging {
  cursor: grabbing;
  opacity: 0.96;
  transform: scale(1.02);
  box-shadow: 0 18px 38px rgba(31, 55, 82, 0.28);
}

.shared-drag-placeholder {
  width: 100%;
  border: 2px dashed #69aee8;
  border-radius: 9px;
  background: rgba(47, 148, 223, 0.08);
}

body.shared-drag-active {
  user-select: none;
  cursor: grabbing;
}

.move-hint {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #edf7ff;
  color: #24537b;
  font-size: 11px;
  font-weight: 700;
}

.mobile-list .order {
  display: inline-flex;
}

.mobile-list .name {
  font-size: 20px;
}

.mobile-list .card-line,
.mobile-list .phone-line,
.mobile-list .eta,
.mobile-list .desired {
  font-size: 14px;
}

.mobile-list .address-line {
  font-size: 16px;
}

.mobile-list .note {
  font-size: 12px;
}

.mobile-list .card-actions button {
  height: 37px;
  font-size: 13px;
}

.empty,
.loading {
  padding: 24px;
  color: var(--muted);
}

#print-root {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  body {
    background: #fff;
    font-size: 7px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  #app {
    display: none;
  }

  #print-root {
    display: block;
  }

  .print-page {
    width: 200mm;
    height: 287mm;
    color: #000;
    overflow: hidden;
  }

  .print-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 2mm;
    border-bottom: 1px solid #777;
    padding-bottom: 1.5mm;
  }

  .print-head h1 {
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
  }

  .print-head p,
  .print-date {
    margin: 0.6mm 0 0;
    font-size: 8.5px;
    font-weight: 700;
  }

  .print-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2mm;
    align-items: start;
  }

  .print-column {
    border: 1px solid #9db5cf;
    border-radius: 3px;
    background: #eaf4fc;
    overflow: hidden;
    break-inside: avoid;
  }

  .print-column-head {
    padding: 1.9mm 2mm;
    border-bottom: 1px solid #b7c9dc;
    background: #e3f0fb;
  }

  .print-column-head h2 {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.25;
  }

  .print-column-head p {
    margin: 0.8mm 0 0;
    font-size: 9.8px;
    font-weight: 700;
  }

  .print-stop-list {
    padding: 1.45mm;
  }

  .print-card {
    margin: 0 0 1.6mm;
    padding: 1.75mm;
    border: 1px solid #9db5cf;
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  .print-card:last-child {
    margin-bottom: 0;
  }

  .print-card-name {
    display: flex;
    align-items: center;
    gap: 1.1mm;
    padding-bottom: 0.75mm;
    margin-bottom: 0.75mm;
    border-bottom: 1px solid #c8d5e4;
    font-size: 10.6px;
    line-height: 1.2;
  }

  .print-card-name strong {
    font-size: 12.2px;
    font-weight: 700;
  }

  .print-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 5.2mm;
    width: 5.2mm;
    height: 5.2mm;
    border-radius: 999px;
    background: #eef4fa;
    font-size: 8px;
    font-weight: 700;
  }

  .print-tag {
    margin-left: auto;
    border: 1px solid #b58600;
    border-radius: 999px;
    padding: 0 1mm;
    color: #5d4600;
    font-size: 7.2px;
    font-weight: 700;
  }

  .print-card-line {
    margin-top: 0.55mm;
    font-size: 9.2px;
    line-height: 1.18;
    word-break: break-word;
  }

  .print-address,
  .print-phone {
    color: #004f9e;
    font-weight: 700;
  }

  .print-address {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .print-eta {
    font-weight: 700;
  }

  .print-note {
    color: #333;
    max-height: 2.25em;
    overflow: hidden;
  }

  .print-hatsubon {
    border-color: #e0a200;
    background: #fff6d8;
  }

  .print-empty {
    padding: 3mm 1mm;
    color: #666;
    text-align: center;
    font-weight: 700;
  }

  .print-dense .print-board {
    gap: 1.8mm;
  }

  .print-dense .print-column-head {
    padding: 1.55mm 1.6mm;
  }

  .print-dense .print-stop-list {
    padding: 1.15mm;
  }

  .print-dense .print-card {
    margin-bottom: 1.15mm;
    padding: 1.35mm;
  }

  .print-dense .print-card-name {
    padding-bottom: 0.45mm;
    margin-bottom: 0.45mm;
  }

  .print-dense .print-card-name strong {
    font-size: 10.6px;
  }

  .print-dense .print-card-line {
    margin-top: 0.4mm;
    font-size: 8.2px;
    line-height: 1.12;
  }

  .print-dense .print-note {
    max-height: 1.5em;
  }

  .print-ultra-dense .print-board {
    gap: 1.2mm;
  }

  .print-ultra-dense .print-column-head {
    padding: 1mm 1.15mm;
  }

  .print-ultra-dense .print-column-head h2 {
    font-size: 8.8px;
  }

  .print-ultra-dense .print-column-head p {
    font-size: 6.8px;
  }

  .print-ultra-dense .print-stop-list {
    padding: 0.6mm;
  }

  .print-ultra-dense .print-card {
    margin-bottom: 0.75mm;
    padding: 0.85mm;
  }

  .print-ultra-dense .print-card-name {
    gap: 0.5mm;
    padding-bottom: 0.25mm;
    margin-bottom: 0.25mm;
  }

  .print-ultra-dense .print-card-name strong {
    font-size: 7.4px;
  }

  .print-ultra-dense .print-order {
    flex-basis: 3.7mm;
    width: 3.7mm;
    height: 3.7mm;
    font-size: 5.7px;
  }

  .print-ultra-dense .print-tag {
    padding: 0 0.5mm;
    font-size: 5px;
  }

  .print-ultra-dense .print-card-line {
    margin-top: 0.25mm;
    font-size: 6px;
    line-height: 1.08;
  }

  .print-ultra-dense .print-note {
    max-height: 1.1em;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px 0 40px;
  }

  .editor-frame {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
  }

  .home-frame {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
  }

  .home-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hoji-day-attendance {
    padding: 10px;
  }

  .hoji-day-attendance-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hoji-day-person {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    padding: 0;
  }

  .hoji-day-attending-button {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hoji-day-part-buttons {
    display: flex;
    flex: none;
    gap: 0;
  }

  .hoji-day-part-buttons button {
    min-height: 26px;
    min-width: 0;
    padding: 1px 4px;
    font-size: 9px;
  }

  .attendance-frame {
    width: calc(100vw - 20px);
  }

  .attendance-table-wrap {
    overflow-x: hidden;
  }

  .attendance-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-spacing: 0 6px;
  }

  .attendance-table th,
  .attendance-table td {
    min-width: 0;
    padding: 4px 2px;
  }

  .attendance-table thead th {
    font-size: 10px;
  }

  .attendance-table thead th:first-child,
  .attendance-table tbody th {
    width: 54px;
  }

  .attendance-table tbody th {
    min-width: 0;
    white-space: normal;
    font-size: 10px;
    line-height: 1.25;
  }

  .attendance-person {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    margin-inline: 0;
  }

  .attendance-full-button {
    min-height: 24px;
    padding: 3px 1px;
    font-size: 10px;
  }

  .attendance-part-buttons {
    gap: 0;
  }

  .attendance-part-buttons button {
    width: 17px;
    min-width: 17px;
    min-height: 22px;
    padding: 1px 0;
    font-size: 8px;
  }

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

  .module-button {
    min-height: 112px;
  }

  .module-button strong {
    font-size: 19px;
  }

  .date-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .month-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .day-tabs {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .weekday-head,
  .day-blank,
  .day-tabs button {
    min-width: 0;
  }

  .day-tabs button {
    min-height: 94px;
    padding: 5px 1px;
  }

  .day-tabs strong {
    display: grid;
    gap: 0;
    font-size: 26px;
    line-height: 1.1;
  }

  .calendar-day-count {
    font-size: 9px;
    line-height: 1.15;
    padding-block: 2px;
    white-space: normal;
  }

  .routes-scroll {
    overflow-x: auto;
  }

  .hoji-routes-scroll {
    overflow-x: hidden;
  }

  .hoji-routes {
    grid-template-columns: repeat(var(--hoji-column-count, 1), minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px;
    min-width: 0;
  }

  .hoji-routes.single-column {
    grid-template-columns: minmax(0, calc((100% - 4px) / 2));
    justify-content: center;
  }

  .hoji-mobile-sticky-heads {
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    width: 100%;
    margin-top: 12px;
    overflow-x: hidden;
    border: 1px solid var(--column-line);
    border-radius: 10px;
    background: var(--column);
    scrollbar-width: none;
  }

  .hoji-mobile-sticky-heads::-webkit-scrollbar {
    display: none;
  }

  .hoji-mobile-sticky-track {
    display: grid;
    grid-template-columns: repeat(var(--hoji-column-count, 1), minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }

  .hoji-mobile-sticky-track.single-column {
    grid-template-columns: minmax(0, calc((100% - 4px) / 2));
    justify-content: center;
  }

  .hoji-mobile-staff-head {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 50px;
    box-sizing: border-box;
    padding: 4px;
    color: #0d213f;
    font-size: 11px;
    font-weight: 700;
    gap: 2px;
  }

  .hoji-mobile-staff-head select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 38px;
    border: 1px solid #9fb2ca;
    border-radius: 7px;
    padding: 3px;
    background: #fff;
    color: #0d213f;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    text-align-last: center;
  }

  .hoji-routes .hoji-column-head {
    display: none;
  }

  .hoji-column {
    width: 100%;
    min-width: 0;
  }

  .hoji-mobile-staff-head .hoji-column-drag-handle {
    flex-basis: 18px;
    width: 18px;
    height: 34px;
    font-size: 12px;
  }

  .hoji-mobile-head-placeholder {
    width: 100%;
    min-width: 0;
    height: 48px;
  }

  .staff-index-row {
    grid-template-columns: 1fr;
  }

  .staff-index-dates {
    grid-column: auto;
  }

  .routes {
    grid-template-columns: repeat(4, 210px);
    min-width: max-content;
  }

  .route-column,
  .visit-card {
    width: auto;
  }

  .mobile-page {
    padding: 0;
  }

  .mobile-route {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .mobile-list {
    padding: 16px 18px 28px;
  }
}

@media (max-width: 760px) {
  .day-tabs strong {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .calendar-day-number {
    display: block;
    white-space: nowrap;
  }
}

@media (max-width: 680px) {
  .calendar-day-staff {
    gap: 1px;
    padding-inline: 2px;
  }

  .calendar-staff-name-full {
    display: none;
  }

  .calendar-staff-name-compact {
    display: block;
    width: 100%;
    transform: scaleX(0.88);
    transform-origin: center;
  }

  .calendar-staff-person {
    min-height: 15px;
    overflow: visible;
    padding-inline: 0;
    font-size: 9px;
  }

  .calendar-staff-person.attending {
    border-color: rgb(153 174 195 / 72%);
    background: rgb(255 255 255 / 82%);
  }
}

@media (max-width: 520px) {

  .hoji-day-attendance-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .hoji-day-attendance-heading strong {
    font-size: 15px;
  }

  .hoji-day-attendance-heading span {
    font-size: 11px;
  }

  .hoji-assignment-confirm-button {
    min-width: 108px;
    min-height: 34px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .calendar-day-count {
    display: none;
  }

  .calendar-day-count-compact {
    display: block;
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    padding-block: 2px;
    text-align: center;
    white-space: nowrap;
  }

  .calendar-day-staff {
    gap: 1px;
    padding-inline: 2px;
  }

  .calendar-staff-name-full {
    display: none;
  }

  .calendar-staff-name-compact {
    display: block;
  }

}

@media (max-width: 400px) {
  .calendar-day-number {
    font-size: 23px;
  }
}

@media (max-width: 350px) {
  .calendar-day-number {
    font-size: 21px;
  }

  .calendar-day-staff {
    padding-inline: 0;
  }

  .calendar-staff-person {
    font-size: 8px;
  }

  .calendar-day-count-compact {
    font-size: 8px;
  }
}

.hoji-card {
  touch-action: pan-y;
}

@media (max-width: 760px) {
  .reference-topbar [data-action="reference-upload"] {
    display: none;
  }

  .hoji-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hoji-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: 6px;
  }

  .hoji-title-actions > .title-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .hoji-title-actions button {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .hoji-topbar [data-action="create-omairi-schedule"],
  .hoji-topbar [data-action="open-staff-members"],
  .hoji-topbar [data-action="logout"] {
    display: none;
  }

  .hoji-business-links {
    gap: 5px;
    padding: 7px;
  }

  .hoji-business-links button {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 16px;
  }

  .hoji-input-button {
    min-width: 78px;
    min-height: 42px;
    padding-inline: 8px;
    font-size: 14px;
  }

  .hoji-calendar-toolbar {
    gap: 6px;
  }

  .hoji-calendar-actions {
    min-width: 0;
    gap: 5px;
  }

  .hoji-calendar select {
    width: 88px;
    min-width: 88px;
    padding-inline: 6px;
    font-size: 15px;
  }

  .hoji-calendar-sync-button {
    min-width: 108px;
    min-height: 42px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .hoji-input-shell {
    padding-top: 12px;
  }

  .hoji-input-frame {
    width: min(calc(100% - 20px), 1120px);
  }

  .hoji-input-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hoji-input-form {
    gap: 14px;
    margin-top: 12px;
    padding: 15px;
  }

  .hoji-input-main-field textarea {
    min-height: 190px;
    font-size: 17px;
  }

  .hoji-input-example {
    font-size: 12px;
  }

  .hoji-input-submit {
    justify-self: stretch;
    width: 100%;
  }

  .hoji-input-result {
    padding: 16px;
  }

  .hoji-input-result-details,
  .hoji-input-candidates {
    grid-template-columns: 1fr;
  }

  .hoji-input-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reference-shell {
    padding-top: 12px;
  }

  .reference-frame {
    width: min(calc(100% - 20px), 1080px);
  }

  .reference-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reference-search {
    grid-template-columns: minmax(0, 1fr) 72px;
    padding: 9px;
  }

  .reference-search input {
    font-size: 16px;
  }

  .reference-source-status {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .reference-results,
  .reference-fields {
    grid-template-columns: 1fr;
  }

  .reference-fields > div:nth-child(odd) {
    border-right: 0;
  }

  .reference-fields > div {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .reference-fields dt,
  .reference-fields dd {
    padding: 9px;
  }

  .kakocho-record {
    padding: 10px;
  }
}

