:root {
  --primary-700: #3f7a46;
  --primary-500: #5d9c63;
  --primary-100: #eaf4e5;
  --white: #ffffff;
  --background: #f9faf8;
  --border: #e5e7eb;
  --text: #333333;
  --text-secondary: #666666;
  --danger: #e95353;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #3b82f6;
  --muted: #999999;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  --font-scale: 1;
}

html[data-font-scale="125"] {
  --font-scale: 1.25;
}

* {
  box-sizing: border-box;
}

html {
  background: #eef2ec;
  color: var(--text);
  font-family: "Yu Gothic", "Meiryo", system-ui, sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(93, 156, 99, 0.14), transparent 32rem),
    #eef2ec;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--background);
  box-shadow: none;
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  animation: fade 0.25s ease both;
}

.login-screen {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(249, 250, 248, 0.96) 56%),
    #fbfaf3;
}

.hero {
  position: relative;
  height: 318px;
  overflow: hidden;
  border-radius: 0;
  background: var(--primary-100);
}

.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 50%;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 48%,
    rgba(255, 255, 255, 0.88) 100%
  );
}

.hero::before {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -44px;
  left: -18%;
  z-index: 1;
  height: 84px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: var(--white);
  box-shadow: 0 -10px 28px rgba(255, 255, 255, 0.72);
}

.logo-float {
  display: none;
}

.logo-float .rokumonsen {
  width: 62px;
  height: 62px;
}

.hero-brand {
  display: none;
}

.login-hero-title {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 34px rgba(24, 76, 37, 0.16);
  color: #184c25;
  text-align: left;
  backdrop-filter: blur(10px);
}

.login-hero-title-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.login-hero-title-logo img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.login-hero-title-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.login-hero-title-town {
  color: var(--primary-700);
  font-size: calc(13px * var(--font-scale));
  font-weight: 900;
  line-height: calc(17px * var(--font-scale));
}

.login-hero-title-name {
  overflow-wrap: break-word;
  white-space: normal;
  color: #164a24;
  font-size: calc(27px * var(--font-scale));
  font-weight: 900;
  letter-spacing: 0;
  line-height: calc(32px * var(--font-scale));
}

.login-hero-title-rule {
  display: block;
  width: 72px;
  height: 2px;
  margin: 3px 0 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-500), rgba(63, 122, 70, 0.18));
}

.login-hero-title-subtitle {
  color: #235b2f;
  font-size: calc(11px * var(--font-scale));
  font-weight: 800;
  line-height: calc(16px * var(--font-scale));
}

.login-screen .hero {
  height: clamp(380px, 54vh, 460px);
}

.login-screen .hero > img {
  object-position: 47% 53%;
}

.login-screen .hero::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(255, 255, 255, 0.46) 100%
  );
}

.login-screen .hero::before {
  bottom: -58px;
  height: 72px;
  box-shadow: 0 -8px 22px rgba(255, 255, 255, 0.42);
}

.login-screen .login-hero-title {
  right: 16px;
  left: auto;
  width: min(64vw, 330px);
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 28px rgba(24, 76, 37, 0.12);
  backdrop-filter: blur(7px);
}

.roku-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: visible;
  border-radius: 0;
  vertical-align: middle;
}

.roku-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rokumonsen {
  width: 72px;
  height: 72px;
}

.login-body {
  position: relative;
  z-index: 2;
  padding: 8px 28px 24px;
}

.app-title {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 0 12px;
  text-align: center;
}

.app-title .login-title-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
  border-radius: 0;
}

.app-title .town {
  color: var(--primary-700);
  font-size: calc(24px * var(--font-scale));
  font-weight: 700;
  line-height: calc(32px * var(--font-scale));
}

.app-title .name {
  color: var(--primary-700);
  font-size: calc(34px * var(--font-scale));
  font-weight: 800;
  line-height: calc(44px * var(--font-scale));
}

.login-subtitle {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  line-height: calc(24px * var(--font-scale));
  text-align: center;
}

.prototype-banner {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  border: 1px solid #f6d58b;
  border-left: 5px solid var(--warning);
  border-radius: 12px;
  background: #fff7e6;
  padding: 10px 12px;
  color: #6b4b05;
  font-size: calc(13px * var(--font-scale));
  line-height: calc(19px * var(--font-scale));
}

.content > .prototype-banner {
  margin-bottom: 18px;
}

.prototype-banner strong {
  color: #8a5a00;
  font-size: calc(14px * var(--font-scale));
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 2px;
  background: #d9d8ad;
}

.divider-logo {
  width: 28px;
  height: 28px;
}

.login-settings {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #e5e2d4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.setting-group {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: center;
}

.setting-label {
  color: var(--text-secondary);
  font-size: calc(13px * var(--font-scale));
  font-weight: 800;
  line-height: calc(18px * var(--font-scale));
}

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

.setting-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-secondary);
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
}

.setting-button.active,
.setting-button:hover {
  border-color: var(--primary-700);
  background: var(--primary-700);
  color: var(--white);
}

.language-button {
  width: 100%;
}

.login-assist-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}

.assist-button {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-700);
  font-size: calc(15px * var(--font-scale));
  font-weight: 800;
}

.assist-button.active,
.assist-button:hover {
  border-color: var(--primary-700);
  background: var(--primary-100);
}

.login-mode-header {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-100), rgba(255, 255, 255, 0.86));
}

.mode-kicker {
  color: var(--primary-700);
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
  line-height: calc(20px * var(--font-scale));
}

.login-mode-header h2 {
  margin: 0;
  color: var(--primary-700);
  font-size: calc(24px * var(--font-scale));
  font-weight: 900;
  line-height: calc(32px * var(--font-scale));
}

.login-mode-header p {
  margin: 0;
  color: var(--text);
  font-size: calc(15px * var(--font-scale));
  font-weight: 700;
  line-height: calc(22px * var(--font-scale));
}

.tabs,
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.tab,
.segment {
  min-height: 48px;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
}

.tab.active,
.segment.active {
  background: var(--primary-700);
  color: var(--white);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  line-height: calc(24px * var(--font-scale));
}

.label-icon {
  display: inline-grid;
  width: 22px;
  place-items: center;
  color: var(--primary-700);
  font-size: 18px;
  line-height: 22px;
}

.input-wrap {
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.input-wrap input,
.input-wrap textarea,
.input-wrap select {
  width: 100%;
  min-height: 56px;
  border: 0;
  outline: 0;
  padding: 16px;
  background: transparent;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
}

.input-wrap textarea {
  min-height: 120px;
  resize: vertical;
}

.show-pass {
  min-width: 56px;
  min-height: 56px;
  background: transparent;
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -4px 0 18px;
  font-size: calc(14px * var(--font-scale));
}

.checkbox-row input {
  width: 24px;
  height: 24px;
  accent-color: var(--primary-700);
}

.login-error {
  margin: 0 0 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  padding: 10px 12px;
  color: #b91c1c;
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
  line-height: calc(20px * var(--font-scale));
}

.prototype-login-note {
  margin: -2px 0 14px;
  color: var(--text-secondary);
  font-size: calc(13px * var(--font-scale));
  line-height: calc(19px * var(--font-scale));
}

.login-secondary-area {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.text-link-button {
  min-height: 48px;
  background: transparent;
  color: var(--primary-700);
  font-size: calc(15px * var(--font-scale));
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  padding: 0 18px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.primary-button {
  width: 100%;
  min-height: 60px;
  background: linear-gradient(180deg, var(--primary-700), #2f6336);
  color: var(--white);
  font-size: calc(20px * var(--font-scale));
  font-weight: 800;
}

.secondary-button {
  width: 100%;
  border: 2px solid var(--primary-700);
  background: var(--white);
  color: var(--primary-700);
  font-weight: 800;
}

.login-help-mail-button {
  text-decoration: none;
}

.login-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 35, 23, 0.58);
}

.login-help-panel {
  width: min(100%, 620px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 4px solid var(--primary-700);
  border-radius: 8px;
  background: var(--white);
  padding: 28px;
  box-shadow: 0 24px 64px rgba(20, 35, 23, 0.28);
}

.login-help-panel h2 {
  margin: 0 0 18px;
  color: var(--primary-700);
  font-size: calc(30px * var(--font-scale));
  line-height: 1.25;
}

.login-help-main,
.login-help-note {
  margin: 0 0 20px;
  font-size: calc(22px * var(--font-scale));
  line-height: 1.6;
}

.login-help-detail {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
}

.login-help-detail div {
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--primary-100);
  padding: 16px;
}

.login-help-detail dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: calc(18px * var(--font-scale));
  font-weight: 700;
}

.login-help-detail dd {
  margin: 0;
  color: var(--text);
  font-size: calc(24px * var(--font-scale));
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.login-help-note {
  border-left: 6px solid var(--warning);
  padding-left: 14px;
  font-weight: 800;
}

.login-help-close-button {
  width: 100%;
  font-size: calc(22px * var(--font-scale));
}

.login-screen .primary-button,
.login-screen .secondary-button {
  border-radius: 8px;
}

.login-screen .secondary-button {
  border-width: 1px;
}

.ghost-button {
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 800;
}

.danger-button {
  background: #fff1f1;
  color: var(--danger);
  font-weight: 800;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.menu-card:hover,
.priority-card:hover,
.panel:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px) scale(1.01);
}

.divider-title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 24px 0 14px;
  color: var(--text);
  font-weight: 700;
}

.divider-title::before,
.divider-title::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.help-link {
  display: block;
  min-height: 48px;
  color: var(--primary-700);
  text-align: center;
  text-decoration: none;
  font-size: calc(14px * var(--font-scale));
  line-height: calc(48px * var(--font-scale));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 84px 1fr 104px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--primary-700), #2e6637);
  color: var(--white);
}

.admin-resident-topbar {
  grid-template-columns: minmax(122px, auto) 1fr 96px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  min-width: 48px;
  min-height: 48px;
  place-items: center;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font-size: 24px;
}

.topbar-action-button {
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.logout-icon-button {
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.topbar-return-button {
  padding: 0 10px;
  font-size: calc(13px * var(--font-scale));
}

.header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: var(--white);
  font-size: calc(18px * var(--font-scale));
  font-weight: 800;
  line-height: calc(24px * var(--font-scale));
}

.header-title span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-logo {
  width: 28px;
  height: 28px;
}

.badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--danger);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

.content {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px 16px calc(112px + env(safe-area-inset-bottom, 0px));
}

.home-hero-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  background: var(--primary-100);
}

.home-hero-card > img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: 25% 45%;
}

.home-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.72));
}

.home-hero-card .hero-priority-card {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
}

.home-main-area,
.home-left-column,
.home-right-column {
  display: grid;
  gap: 16px;
}

.priority-card {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.priority-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.72)),
    url("image/matsushiro.png") right center / 58% auto no-repeat;
}

.hero-priority-card::after {
  display: none;
}

.priority-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 120px;
  align-items: center;
  gap: 18px;
  padding: 24px;
}

.large-round-icon {
  position: relative;
  display: grid;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-500);
  color: var(--white);
  font-size: 36px;
}

.priority-copy {
  font-size: calc(18px * var(--font-scale));
  font-weight: 700;
  line-height: calc(26px * var(--font-scale));
}

.priority-copy strong {
  color: var(--danger);
  font-size: calc(40px * var(--font-scale));
  line-height: calc(44px * var(--font-scale));
}

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

.menu-card {
  position: relative;
  display: grid;
  min-height: 140px;
  align-content: center;
  gap: 8px;
  border-radius: 20px;
  background: var(--white);
  padding: 16px;
  box-shadow: var(--card-shadow);
  color: var(--text);
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.menu-icon {
  font-size: 42px;
  line-height: 48px;
}

.menu-card h3 {
  margin: 0;
  font-size: calc(20px * var(--font-scale));
  font-weight: 800;
  line-height: calc(28px * var(--font-scale));
}

.menu-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: calc(14px * var(--font-scale));
  line-height: calc(20px * var(--font-scale));
}

.count {
  color: var(--info);
  font-weight: 800;
}

.panel {
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.panel-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
}

.panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: calc(20px * var(--font-scale));
  font-weight: 800;
  line-height: calc(28px * var(--font-scale));
}

.list-item {
  display: grid;
  grid-template-columns: 18px 1fr auto 24px;
  min-height: 56px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f1f1;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.list-item:last-child {
  border-bottom: 0;
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-500);
}

.dot.info {
  background: var(--info);
}

.dot.warning {
  background: var(--warning);
}

.dot.danger {
  background: var(--danger);
}

.item-title {
  min-width: 0;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  line-height: calc(24px * var(--font-scale));
}

.date {
  color: var(--text-secondary);
  font-size: calc(14px * var(--font-scale));
}

.new-pill {
  display: inline-block;
  margin-left: 6px;
  border-radius: 7px;
  background: var(--danger);
  color: var(--white);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: auto;
  max-width: 520px;
  height: 74px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(63, 122, 70, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 28px rgba(20, 35, 23, 0.12);
  backdrop-filter: blur(10px);
}

.resident-bottom-nav {
  grid-template-columns: repeat(3, 1fr);
}

.nav-item {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 18px;
  background: transparent;
  color: #8a948b;
  font-size: calc(12px * var(--font-scale));
  font-weight: 800;
  line-height: 1.15;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-item .nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.nav-item .nav-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.center .nav-icon {
  font-size: 32px;
  line-height: 32px;
}

.nav-item.active {
  background: #eaf4e5;
  color: var(--primary-700);
  box-shadow: inset 0 0 0 1px rgba(63, 122, 70, 0.08);
  transform: translateY(-1px);
}

.page-title {
  margin: 0;
  color: var(--primary-700);
  font-size: calc(24px * var(--font-scale));
  font-weight: 800;
  line-height: calc(32px * var(--font-scale));
}

.notice-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

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

.notice-filter-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  padding: 12px;
  box-shadow: var(--card-shadow);
}

.filter-search-wrap input,
.filter-control-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdf9;
  color: var(--text);
  padding: 0 14px;
  font-size: calc(15px * var(--font-scale));
  font-weight: 700;
}

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

.notice-list-card {
  width: 100%;
  text-align: left;
}

.notice-open-hint {
  color: var(--primary-700);
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
}

.notice-detail-card h2 {
  margin: 0;
  color: var(--text);
  font-size: calc(24px * var(--font-scale));
  font-weight: 900;
  line-height: calc(32px * var(--font-scale));
}

.back-button {
  justify-self: start;
}

.summary-box,
.attachment-box {
  display: grid;
  gap: 12px;
  border-radius: 16px;
  background: var(--white);
  padding: 18px;
  border: 1px solid var(--border);
}

.summary-disclosure {
  display: block;
}

.summary-disclosure[open] {
  display: grid;
}

.summary-toggle {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  background: #eef7e9;
  color: var(--primary-700);
  padding: 0 16px;
  font-size: calc(18px * var(--font-scale));
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.summary-toggle::-webkit-details-marker {
  display: none;
}

.summary-toggle::before {
  content: "＋";
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-700);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
}

.summary-disclosure[open] .summary-toggle::before {
  content: "－";
}

.summary-toggle-hint {
  display: inline-flex;
  margin-left: auto;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  background: var(--white);
  padding: 0 14px;
  color: var(--primary-700);
  font-size: calc(14px * var(--font-scale));
  font-weight: 800;
}

.summary-disclosure[open] .summary-toggle-hint {
  font-size: 0;
}

.summary-disclosure[open] .summary-toggle-hint::after {
  content: "閉じる";
  font-size: calc(14px * var(--font-scale));
}

.summary-box h3,
.attachment-box h3 {
  margin: 0;
  color: var(--text);
  font-size: calc(20px * var(--font-scale));
}

.summary-note {
  margin: 0;
  color: #4b5563;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
}

.attachment-box ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.2em;
  color: #1e3a8a;
  font-size: calc(16px * var(--font-scale));
  line-height: calc(24px * var(--font-scale));
}

.attachment-preview {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f3f6f1;
}

.attachment-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.summary-report {
  display: grid;
  gap: 16px;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.65;
}

.summary-report-section {
  display: grid;
  gap: 8px;
  border-left: 5px solid #5d9c63;
  border-radius: 10px;
  background: #f4faf2;
  padding: 12px 14px;
}

.summary-report-section:nth-of-type(2) {
  border-left-color: #f59e0b;
  background: #fff8e8;
}

.summary-report-section:nth-of-type(3) {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.summary-report-section:nth-of-type(4) {
  border-left-color: #8b5cf6;
  background: #f5f3ff;
}

.summary-report-section h4 {
  margin: 0;
  color: #234f2c;
  font-size: calc(20px * var(--font-scale));
  font-weight: 900;
  line-height: 1.35;
}

.summary-report-section:nth-of-type(2) h4 {
  color: #8a5b00;
}

.summary-report-section:nth-of-type(3) h4 {
  color: #1e3a8a;
}

.summary-report-section:nth-of-type(4) h4 {
  color: #4c1d95;
}

.summary-report-section p {
  margin: 0;
  color: #1f2937;
}

.summary-target-group {
  display: grid;
  gap: 10px;
}

.summary-target-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.6em;
  color: #1f2937;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.55;
}

.notice-card h3 {
  margin: 0;
  font-size: calc(20px * var(--font-scale));
  line-height: calc(28px * var(--font-scale));
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: calc(14px * var(--font-scale));
}

.category-pill,
.status-pill {
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 800;
}

.status-pill.required {
  background: #fff3d6;
  color: #8a5b00;
}

.notice-card p {
  margin: 0;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  line-height: calc(24px * var(--font-scale));
}

.notice-body-full {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-edit-form {
  border-top: 1px solid var(--border);
  padding: 18px 0 0;
}

.admin-edit-form h3 {
  margin: 0;
  color: var(--primary-700);
}

.compact-action-button {
  width: auto;
  min-height: 48px;
  padding: 0 22px;
  font-size: calc(16px * var(--font-scale));
}

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

.notice-detail-actions {
  margin: 4px 0 2px;
}

.notice-detail-actions .primary-button {
  grid-column: 1 / -1;
}

.confirm-guidance {
  border-left: 5px solid var(--primary-500);
  border-radius: 14px;
  background: var(--primary-100);
  padding: 12px 14px;
  color: var(--primary-700);
  font-weight: 800;
  line-height: calc(24px * var(--font-scale));
}

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

.event-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.event-date {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 800;
}

.event-date strong {
  display: block;
  font-size: 24px;
  line-height: 24px;
}

.event-card h3,
.event-card p {
  margin: 0;
}

.event-card h3 {
  font-size: calc(18px * var(--font-scale));
}

.event-card p {
  color: var(--text-secondary);
  font-size: calc(14px * var(--font-scale));
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  display: grid;
  min-height: 84px;
  place-items: center;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.metric strong {
  color: var(--primary-700);
  font-size: calc(24px * var(--font-scale));
}

.metric span {
  color: var(--text-secondary);
  font-size: calc(12px * var(--font-scale));
}

.admin-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ai-draft-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c7d9ef;
  border-left: 5px solid var(--info);
  border-radius: 8px;
  background: #eef6ff;
}

.ai-draft-box h3 {
  margin: 0 0 4px;
  color: #1e3a8a;
  font-size: calc(18px * var(--font-scale));
}

.ai-draft-box p {
  margin: 0;
  color: #374151;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
}

.ai-draft-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.summary-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: var(--white);
}

.summary-editor-note {
  color: #4b5563;
  font-size: calc(13px * var(--font-scale));
}

.summary-editor-grid {
  display: grid;
  gap: 12px;
}

.summary-editor-field {
  display: grid;
  gap: 6px;
}

.summary-editor-field span {
  color: #1f2937;
  font-weight: 800;
  font-size: calc(14px * var(--font-scale));
}

.summary-editor-field textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
}

.summary-editor-field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(63, 122, 70, 0.16);
}

.audience-summary-grid {
  display: grid;
  gap: 0;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: var(--white);
}

.admin-home-metrics {
  padding: 16px;
}

.admin-resident-card {
  border-color: rgba(63, 122, 70, 0.22);
  background: linear-gradient(180deg, #ffffff, #f2f8ef);
}

.admin-unread-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-unread-card {
  position: relative;
  width: 100%;
  text-align: left;
}

.admin-unread-detail-card {
  gap: 16px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.admin-card-actions {
  margin-top: 10px;
}

.unread-detail-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.unread-detail-section h3 {
  margin: 0;
  font-size: calc(18px * var(--font-scale));
}

.unread-block-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.unread-block-card {
  display: grid;
  gap: 8px;
  border: 1px solid #f7d08a;
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
}

.unread-block-card.is-complete {
  border-color: var(--border);
  background: #f8fafc;
}

.unread-block-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.unread-block-card strong {
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
}

.unread-block-card span,
.unread-block-card small {
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 800;
}

.unread-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7f1e3;
}

.unread-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--warning);
}

.unread-group-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.unread-group-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
}

.unread-group-table th,
.unread-group-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: calc(14px * var(--font-scale));
  white-space: nowrap;
}

.unread-group-table th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

.unread-group-table tr:last-child td {
  border-bottom: 0;
}

.compact-empty {
  padding: 14px;
}

.unread-id-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unread-id-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--warning);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--text);
  font-size: calc(15px * var(--font-scale));
  font-weight: 800;
  padding: 0 10px;
}

.admin-delete-button {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--danger);
}

.local-note {
  border-left: 5px solid var(--info);
  border-radius: 16px;
  background: #eff6ff;
  padding: 12px 14px;
  color: #1e3a8a;
  font-size: calc(14px * var(--font-scale));
  line-height: calc(20px * var(--font-scale));
}

.notification-settings-panel {
  overflow: hidden;
}

.notification-settings-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.notification-settings-body p {
  margin: 0;
  color: var(--text);
  font-size: calc(15px * var(--font-scale));
  line-height: calc(22px * var(--font-scale));
}

.notification-actions {
  display: grid;
  gap: 8px;
}

.compact-notification-button {
  width: auto;
  min-height: 48px;
  justify-self: start;
  padding: 0 22px;
  font-size: calc(16px * var(--font-scale));
}

.settings-panel {
  margin-top: 16px;
}

.settings-option-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-option-body p {
  margin: 0;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
}

.settings-action-button {
  width: 100%;
  min-height: 60px;
}

.settings-action-button.active {
  border-color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 800;
}

.empty-state {
  padding: 32px 16px;
  color: var(--text-secondary);
  text-align: center;
}

@media (min-width: 680px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .screen {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .bottom-nav {
    right: max(18px, env(safe-area-inset-right, 0px));
    left: max(18px, env(safe-area-inset-left, 0px));
    max-width: 560px;
  }

  .login-body {
    padding-right: 64px;
    padding-left: 64px;
  }

  .login-screen .hero {
    height: clamp(430px, 50vh, 540px);
  }

  .login-screen .hero > img {
    object-position: 50% 52%;
  }

  .login-screen .login-hero-title {
    top: 22px;
    right: 28px;
    left: auto;
    width: min(44vw, 360px);
    padding: 14px 16px;
  }

  .content {
    padding-right: 28px;
    padding-left: 28px;
  }

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

@media (max-width: 679px) {
  .login-screen .hero {
    height: clamp(258px, 36vh, 306px);
  }

  .login-screen .hero > img {
    object-position: 36% 50%;
  }

  .login-screen .login-hero-title {
    top: 14px;
    right: 14px;
    left: auto;
    width: min(72vw, 292px);
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
  }

  .login-hero-title-logo,
  .login-hero-title-logo img {
    width: 32px;
    height: 32px;
  }

  .login-hero-title-town {
    font-size: calc(11px * var(--font-scale));
    line-height: calc(15px * var(--font-scale));
  }

  .login-hero-title-name {
    font-size: calc(22px * var(--font-scale));
    line-height: calc(27px * var(--font-scale));
  }

  .login-hero-title-subtitle {
    font-size: calc(9.5px * var(--font-scale));
    line-height: calc(14px * var(--font-scale));
  }

  .home-hero-card {
    min-height: 292px;
  }

  .home-hero-card > img {
    height: 292px;
    object-position: 22% 50%;
  }

  .home-hero-card::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38));
  }

  .home-hero-card .hero-priority-card {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .hero-priority-card.priority-card {
    min-height: 104px;
    border-radius: 22px;
  }

  .hero-priority-card .priority-inner {
    min-height: 104px;
    gap: 14px;
    padding: 18px 20px;
  }

  .hero-priority-card .large-round-icon {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
    font-size: 30px;
  }

  .hero-priority-card .priority-copy {
    font-size: calc(17px * var(--font-scale));
    line-height: calc(24px * var(--font-scale));
  }

  .hero-priority-card .priority-copy strong {
    font-size: calc(36px * var(--font-scale));
    line-height: calc(40px * var(--font-scale));
  }
}

@media (min-width: 1200px) {
  html[data-font-scale="100"] {
    --font-scale: 1.15;
  }

  html[data-font-scale="125"] {
    --font-scale: 1.4;
  }

  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .screen {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .login-screen {
    display: grid;
    grid-template-columns: minmax(0, 54fr) minmax(460px, 46fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--white);
  }

  .login-screen .hero {
    position: sticky;
    top: 0;
    z-index: 3;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .login-screen .hero::before,
  .login-screen .hero::after {
    display: none;
  }

  .login-screen .hero > img {
    height: 100%;
    object-position: 36% 50%;
  }

  .login-screen .logo-float {
    display: none;
  }

  .login-screen .login-hero-title {
    top: 32px;
    right: 36px;
    left: auto;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    width: min(36%, 400px);
    padding: 18px 22px;
    border-radius: 22px;
  }

  .login-hero-title-logo {
    width: 52px;
    height: 52px;
  }

  .login-hero-title-logo img {
    width: 52px;
    height: 52px;
  }

  .login-hero-title-town {
    font-size: calc(14px * var(--font-scale));
    line-height: calc(19px * var(--font-scale));
  }

  .login-hero-title-name {
    font-size: calc(30px * var(--font-scale));
    line-height: calc(37px * var(--font-scale));
  }

  .login-hero-title-subtitle {
    font-size: calc(13px * var(--font-scale));
    line-height: calc(19px * var(--font-scale));
  }

  .hero-brand-logo {
    position: relative;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .hero-brand-logo img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    display: block;
    object-fit: contain;
    object-position: 50% 50%;
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  .hero-brand-copy {
    display: grid;
    gap: 2px;
    padding-top: 2px;
  }

  .hero-brand-town {
    font-size: calc(15px * var(--font-scale));
    font-weight: 800;
    line-height: calc(19px * var(--font-scale));
  }

  .hero-brand-name {
    font-size: calc(38px * var(--font-scale));
    font-weight: 900;
    line-height: calc(44px * var(--font-scale));
  }

  .hero-brand-subtitle {
    margin-top: 2px;
    font-size: calc(14px * var(--font-scale));
    font-weight: 800;
    line-height: calc(20px * var(--font-scale));
  }

  .hero-brand {
    position: absolute;
    top: 46px;
    left: 48px;
    z-index: 4;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    max-width: 480px;
    color: #184c25;
    text-shadow: 0 1px 12px rgba(255, 255, 255, 0.82);
  }

  .login-body {
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 58px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 250, 248, 0.98)),
      var(--background);
  }

  .login-body .app-title,
  .login-body .login-subtitle,
  .login-body .login-divider {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(112px, auto) minmax(0, 1fr) minmax(140px, auto);
    min-height: 80px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .home-content {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .content {
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
    padding: 28px 32px calc(128px + env(safe-area-inset-bottom, 0px));
  }

  .home-hero-card {
    min-height: 260px;
  }

  .home-hero-card > img {
    height: 300px;
  }

  .home-hero-card .hero-priority-card {
    right: 28px;
    bottom: 24px;
    left: 28px;
    max-width: 520px;
  }

  .home-main-area {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
    align-items: start;
  }

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

  .bottom-nav {
    right: 32px;
    bottom: 18px;
    left: 32px;
    max-width: 1120px;
    height: 80px;
    border-radius: 26px;
  }

  .nav-item {
    min-height: 62px;
    font-size: calc(13px * var(--font-scale));
  }

  .nav-item .nav-icon,
  .nav-item .nav-icon svg {
    width: 26px;
    height: 26px;
  }
}

@media (min-width: 1280px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
