@charset "UTF-8";

/* 公式Google FontsリポジトリのOFL 1.1書体を自己配信し、閲覧時の第三者通信を防ぐ。 */
@font-face {
  font-family: "M PLUS Rounded 1c Local";
  font-display: swap;
  font-style: normal;
  font-weight: 400 700;
  src: url("../fonts/RoundedMplus1c-Regular.ttf") format("truetype");
}

:root {
  --paper: #fffdf5;
  --paper-edge: #dfd0ae;
  --rule: rgba(92, 151, 183, 0.2);
  --margin-line: rgba(214, 104, 104, 0.42);
  --ink: #28384a;
  --ink-soft: #617083;
  --navy: #35556f;
  --navy-dark: #263f54;
  --green: #557965;
  --green-dark: #3f5d4d;
  --yellow: #f4df9b;
  --red: #b95454;
  --white: #fff;
  --shadow: 0 18px 45px rgba(54, 45, 31, 0.14);
  --shadow-small: 0 7px 18px rgba(54, 45, 31, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  color: var(--ink);
  font-family: "M PLUS Rounded 1c Local", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(135deg, #ddd1b8 0%, #c8b99b 100%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; }
a { color: var(--navy); font-weight: 700; text-underline-offset: 4px; }
a:hover { color: var(--green-dark); }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #1f6fa5;
  outline-offset: 3px;
}

.site-header,
body:has(.diary-table) .container,
.login-page .container,
.register-page .register-container,
.privacy-container,
.error-container {
  position: relative;
  width: min(1180px, 100%);
  margin-inline: auto;
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent 0 62px, var(--margin-line) 62px 64px, transparent 64px), repeating-linear-gradient(0deg, transparent 0 31px, var(--rule) 31px 32px);
  border: 1px solid var(--paper-edge);
  border-radius: 7px 18px 18px 7px;
  box-shadow: var(--shadow);
}
.site-header::before,
body:has(.diary-table) .container::before,
.login-page .container::before,
.register-page .register-container::before,
.privacy-container::before,
.error-container::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 20px;
  width: 17px;
  content: "";
  background: radial-gradient(circle, #a5967d 0 3px, #eee6d7 3.5px 5px, transparent 5.5px) top center / 17px 32px repeat-y;
  opacity: 0.7;
  pointer-events: none;
}
.site-header::after,
body:has(.diary-table) .container::after,
.login-page .container::after,
.register-page .register-container::after,
.privacy-container::after,
.error-container::after {
  position: absolute;
  z-index: 2;
  top: 20px;
  bottom: 20px;
  left: -10px;
  width: 34px;
  content: "";
  background: repeating-linear-gradient(0deg, transparent 0 19px, #776f64 19px 22px, #b9afa0 22px 25px, transparent 25px 32px);
  filter: drop-shadow(1px 2px 1px rgba(57, 48, 38, 0.24));
  pointer-events: none;
}
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 22px 28px 22px 84px; }
.site-header h1 { color: var(--navy-dark); font-size: clamp(1.25rem, 3vw, 1.8rem); line-height: 1.4; overflow-wrap: anywhere; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.logout-form { flex: 0 0 auto; }
body:has(.diary-table) .container { padding: 28px 30px 38px 84px; }
.diary-write-section { margin-bottom: 26px; }

.language-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.header-actions .language-switch { margin-bottom: 0; }
.language-switch a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.language-switch a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  background: rgba(244, 223, 155, 0.54);
  cursor: default;
}

.diary-form-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  color: var(--navy-dark);
  font-weight: 700;
  text-align: left;
  background: rgba(244, 223, 155, 0.58);
  border: 1px solid #d9bd64;
  border-radius: 5px;
  box-shadow: 0 4px 0 rgba(141, 116, 49, 0.18);
  cursor: pointer;
}
.diary-form-toggle:hover { background: rgba(244, 223, 155, 0.82); }
.toggle-icon { margin-left: 14px; }
.diary-form-container { display: none; margin-top: 14px; }
.diary-form-container form, .login-page form, .register-page form, #editForm { padding: 22px; background: rgba(255, 255, 255, 0.76); border: 1px solid rgba(99, 124, 142, 0.22); border-radius: 8px; }
.form-group + .form-group {
    margin-top: 16px;
}

.form-hint {
  margin: 7px 2px 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}
label { display: block; margin-bottom: 6px; color: var(--navy-dark); font-size: 0.92rem; font-weight: 700; }
input[type="text"], input[type="password"], input[type="date"], textarea, select { width: 100%; padding: 10px 12px; color: var(--ink); background: rgba(255, 255, 255, 0.92); border: 1px solid #afbdc5; border-radius: 6px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(53, 85, 111, 0.14); }
button, .pagination-button, .btn-reset { border: 0; cursor: pointer; }
button[type="submit"], .btn-primary, .btn-secondary, .btn-edit, .btn-search, .btn-reset, .pagination-button, .btn-text { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 17px; color: var(--white); font-weight: 700; text-decoration: none; background: var(--green); border: 1px solid var(--green-dark); border-radius: 6px; box-shadow: 0 3px 0 rgba(45, 71, 57, 0.25); cursor: pointer; transition: background-color 0.18s, box-shadow 0.18s, transform 0.18s; }
button[type="submit"]:hover, .btn-primary:hover, .btn-edit:hover, .btn-search:hover, .btn-text:hover { background: var(--green-dark); transform: translateY(1px); }
.form-actions { margin-top: 18px; text-align: right; }
.logout-form button { white-space: nowrap; }

.diary-list-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.diary-list-header h2 { color: var(--navy-dark); font-size: 1.35rem; }
.sort-form, .search-form, .search-controls { display: flex; align-items: center; gap: 10px; }
.sort-label, .search-label { margin: 0; white-space: nowrap; }
.sort-select { width: auto; min-width: 140px; }
.diary-search-bar { margin-bottom: 16px; padding: 12px 14px; background: rgba(255, 255, 255, 0.62); border: 1px dashed #9aaab3; border-radius: 7px; }
.search-form { justify-content: space-between; }
.search-controls { justify-content: flex-end; flex: 1; }
.search-input { max-width: 230px; }
.btn-search, .btn-reset { min-width: 82px; }
.btn-reset, .btn-secondary { color: var(--ink); background: #eee8da; border-color: #c9baa0; }

.table-responsive { width: 100%; overflow-x: auto; border: 1px solid #c5d0d6; border-radius: 8px; box-shadow: var(--shadow-small); }
.diary-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: rgba(255, 255, 255, 0.72); }
.diary-table th, .diary-table td { padding: 13px 11px; text-align: left; vertical-align: middle; overflow-wrap: anywhere; border-bottom: 1px solid rgba(104, 151, 178, 0.2); }
.diary-table th { color: var(--white); font-size: 0.88rem; letter-spacing: 0.04em; background: var(--navy); }
.diary-table tbody tr:nth-child(even) td { background: rgba(236, 245, 248, 0.46); }
.diary-table tbody tr:hover td { background: rgba(244, 223, 155, 0.26); }
.diary-table th:nth-child(1), .diary-table td:nth-child(1), .diary-table th:nth-child(2), .diary-table td:nth-child(2) { width: 16%; }
.diary-table td:nth-child(1):not(.empty-message), .diary-table td:nth-child(2):not(.empty-message) { white-space: nowrap; }
.diary-table th:nth-child(3), .diary-table td:nth-child(3) { width: 9%; }
.diary-table th:nth-child(4), .diary-table td:nth-child(4) { width: 20%; }
.diary-table th:nth-child(5), .diary-table td:nth-child(5) { width: 24%; }
.diary-table th:nth-child(6), .diary-table td:nth-child(6) { width: 15%; text-align: center; }
.btn-edit { padding: 6px 12px; font-size: 0.86rem; }
.row-actions { display: flex; justify-content: center; gap: 7px; }
.empty-message { padding: 34px !important; color: var(--ink-soft); text-align: center !important; }

/* 会話取込みは必要な時だけ開く。既存の日記欄・保存ボタンを再利用する。 */
.chat-import-panel { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--green); border-radius: 8px; background: rgba(255, 255, 255, .86); }
.chat-import-panel summary { min-height: 44px; padding: 10px 0; font-weight: 700; cursor: pointer; text-wrap: pretty; }
.chat-import-panel p, .chat-import-panel li { text-wrap: pretty; overflow-wrap: anywhere; }
.chat-import-panel p { margin: 8px 0 12px; }
.chat-import-panel textarea { width: 100%; min-width: 0; font-size: 1rem; }
.chat-import-panel button { min-height: 44px; white-space: normal; }
.chat-import-help { margin-bottom: 16px; }
.chat-import-help ol { padding-left: 24px; }
.chat-import-help li { margin: 8px 0; }
.chat-import-panel .chat-import-error { color: var(--red); font-weight: 700; }
#chatDiaryMessage { white-space: pre-line; }
.chat-import-replace { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--green); }
.chat-import-replace button { margin: 4px 8px 4px 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pagination-button { min-width: 86px; }
.pagination-info { min-width: 70px; color: var(--ink-soft); font-weight: 700; text-align: center; }

.modal, .notification-modal { position: fixed; z-index: 1000; inset: 0; display: none; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); background: rgba(24, 34, 43, 0.52); backdrop-filter: blur(3px); }
.modal-content, .notification-modal-content { width: min(560px, 100%); max-height: 90vh; max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom))); overflow-y: auto; padding: 28px; background-color: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 31px, var(--rule) 31px 32px); border: 1px solid var(--paper-edge); border-radius: 10px; box-shadow: var(--shadow); }
.modal-content h2 { margin-bottom: 16px; color: var(--navy-dark); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.error-message, .register-error-message { margin-bottom: 14px; color: var(--red); font-weight: 700; white-space: pre-line; }
.notification-modal-content { text-align: center; }
#notificationMessage { white-space: pre-line; text-align: left; text-wrap: pretty; overflow-wrap: anywhere; }
.startup-notice-body, .policy-section p, .policy-notice p, .error-message { text-wrap: pretty; overflow-wrap: anywhere; }
.site-header h1, .policy-header h1, .policy-section h2, .error-container h1 { text-wrap: balance; }
.notification-modal-content button { margin-top: 20px; }
.notification-ok-button { min-width: 88px; min-height: 44px; padding: 9px 17px; color: var(--white); background: var(--green); border: 1px solid var(--green-dark); border-radius: 6px; font-weight: 700; }

.login-page, .register-page { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; }
.login-page .container, .register-page .register-container, .error-container { width: min(470px, 100%); padding: 34px 32px 34px 76px; }
.app-title, .app-brand { margin-bottom: 22px; text-align: center; }
.app-title-main, .app-brand { color: var(--navy-dark); font-size: 1.7rem; font-weight: 700; }
.app-title-sub { color: var(--ink-soft); font-size: 0.86rem; }
.startup-notice {
  margin: -4px 0 18px;
  padding: 12px 14px;
  color: #4f472e;
  font-size: 0.82rem;
  line-height: 1.55;
  background: rgba(255, 248, 218, 0.84);
  border: 1px solid #d3bd68;
  border-radius: 7px;
}
.startup-notice strong, .startup-notice span { display: block; }
.startup-notice strong { margin-bottom: 3px; color: #66530f; font-size: 0.88rem; }
.login-page .login-privacy-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 0 8px;
}
details.startup-notice { margin: 0 0 18px; padding: 0; }
.startup-notice summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 14px;
  color: #66530f;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.startup-notice summary::-webkit-details-marker { display: none; }
.startup-notice summary::before { content: "▼"; flex: 0 0 auto; }
.startup-notice[open] summary::before { transform: rotate(180deg); }
.startup-notice summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.startup-notice-body { padding: 0 14px 14px; }
.login-page h1, .register-page h1, .error-container h1 { margin-bottom: 18px; color: var(--navy-dark); text-align: center; }
.login-page button[type="submit"], .register-page button[type="submit"] { width: 100%; margin-top: 20px; }
.login-page a, .register-page a { display: block; margin-top: 22px; text-align: center; }
.login-page .form-footer a, .register-page .form-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.error-container { text-align: center; }
.error-container h1 { font-size: clamp(1.2rem, 3vw, 1.55rem); }

.app-footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(99, 124, 142, 0.22);
}
.app-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 10px; }
.privacy-page { display: block; }
.privacy-container { width: min(900px, 100%); margin-inline: auto; padding: 34px 34px 38px 84px; }
.policy-header { margin-bottom: 24px; }
.policy-header h1 { margin: 4px 0 10px; color: var(--navy-dark); font-size: clamp(1.7rem, 4vw, 2.35rem); }
.policy-app-name { color: var(--green-dark); font-weight: 700; }
.policy-notice { margin-bottom: 22px; padding: 16px 18px; background: #fff4df; border: 2px solid #b87527; border-radius: 8px; }
.policy-notice h2 { margin-bottom: 6px; color: #79450b; font-size: 1.15rem; }
.policy-sections { display: grid; gap: 14px; }
.policy-section { padding: 18px 20px; background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(99, 124, 142, 0.24); border-radius: 8px; }
.policy-section h2 { margin-bottom: 8px; color: var(--navy-dark); font-size: 1.15rem; }
.policy-updated { margin-top: 20px; color: var(--ink-soft); font-size: 0.88rem; }
.policy-actions { display: flex; margin-top: 18px; }

/* 新規登録画面だけを緑系に切り替え、ログイン画面との誤認を防ぐ。 */
.register-page {
  background:
    radial-gradient(circle at 15% 12%, rgba(247, 255, 248, 0.96), transparent 34%),
    linear-gradient(135deg, #c9f2d5 0%, #8ed4aa 100%);
}
.register-page .register-container {
  background-color: #f7fff8;
  background-image:
    linear-gradient(90deg, transparent 0 62px, rgba(85, 176, 112, 0.42) 62px 64px, transparent 64px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(91, 181, 119, 0.18) 31px 32px);
  border-color: #95cdaa;
  box-shadow: 0 18px 45px rgba(40, 112, 67, 0.2);
}
.register-page .register-container::before {
  background: radial-gradient(circle, #58a977 0 3px, #d9f3e2 3.5px 5px, transparent 5.5px) top center / 17px 32px repeat-y;
}
.register-page .register-container::after {
  background: repeating-linear-gradient(0deg, transparent 0 19px, #348a56 19px 22px, #80c89a 22px 25px, transparent 25px 32px);
  filter: drop-shadow(1px 2px 1px rgba(33, 105, 61, 0.24));
}
.register-page .app-title-main, .register-page h1 { color: #236540; }
.register-page .app-title-sub { color: #4f7d60; }
.register-page form { background: rgba(255, 255, 255, 0.82); border-color: rgba(68, 153, 94, 0.3); }
.register-page label { color: #286d46; }
.register-page input[type="text"], .register-page input[type="password"] { border-color: #8ebda0; }
.register-page input:focus { border-color: #3ca869; box-shadow: 0 0 0 3px rgba(60, 168, 105, 0.18); }
.register-page button[type="submit"] { background: #43a968; border-color: #2f8050; box-shadow: 0 3px 0 rgba(39, 108, 67, 0.3); }
.register-page button[type="submit"]:hover { background: #318a55; }
.register-page a { color: #28764a; }
.register-page a:hover { color: #1f5e3b; }

@media (max-width: 960px) {
  body { padding: max(14px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); background-attachment: scroll; }
  .site-header { align-items: flex-start; flex-wrap: wrap; padding: 18px 18px 18px 54px; }
  body:has(.diary-table) .container { padding: 22px 16px 30px 54px; }
  .diary-list-header, .search-form { align-items: stretch; flex-direction: column; }
  .sort-form, .search-controls { width: 100%; }
  .sort-select, .search-input { width: 100%; max-width: none; }
  .table-responsive { overflow: visible; border: 0; box-shadow: none; }
  .diary-table, .diary-table tbody, .diary-table tr, .diary-table td { display: block; width: 100% !important; }
  .diary-table thead { display: none; }
  .diary-table tr { margin-bottom: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.84); border: 1px solid #c5d0d6; border-radius: 8px; box-shadow: var(--shadow-small); }
  .diary-table td { display: grid; grid-template-columns: 92px 1fr; gap: 10px; min-height: 42px; padding: 10px 12px; background: transparent !important; }
  .diary-table td::before { color: var(--navy); font-size: 0.8rem; font-weight: 700; content: attr(data-label); }
  .diary-table td:last-child { display: flex; justify-content: flex-end; }
  .row-actions { width: 100%; }
  .row-actions button { flex: 1; }
}

@media (max-width: 520px) {
  .site-header, .header-actions, .search-controls, .modal-actions { align-items: stretch; flex-direction: column; }
  .header-actions .language-switch { justify-content: flex-start; }
  .site-header .logout-form, .site-header .logout-form button, .btn-search, .btn-reset, .btn-primary, .btn-secondary { width: 100%; }
  .login-page .container, .register-page .register-container, .privacy-container, .error-container { padding: 28px 20px 30px 56px; }
  .policy-section { padding: 15px 14px; }
  .modal-content, .notification-modal-content { padding: 20px; }
  #editForm { padding: 16px; }
  .diary-table td { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .empty-message { display: block !important; padding: 20px !important; text-wrap: pretty; }
  .empty-message::before { display: none; }
}

/* 認証画面は入力を先に見せ、補足を開いても入力欄の位置を動かさない。 */
.login-page, .register-page {
  align-items: start;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.login-page .container, .register-page .register-container { padding-top: 16px; padding-bottom: 18px; }
.login-page .language-switch, .register-page .language-switch { margin-bottom: 4px; }
.login-page .language-switch a, .register-page .language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 1.5;
}
.login-page .app-title, .register-page .app-title { margin-bottom: 8px; }
.login-page .app-title-main, .register-page .app-title-main { font-size: 1.3rem; }
.login-page h1, .register-page h1 { margin-bottom: 10px; font-size: 1.55rem; line-height: 1.35; }
.login-page form, .register-page form { padding: 16px; }
.login-page form { background: rgba(255, 255, 255, 0.9); }
.login-page .form-group + .form-group, .register-page .form-group + .form-group { margin-top: 12px; }
.login-page button[type="submit"], .register-page button[type="submit"] { min-height: 48px; margin-top: 16px; }
.login-page .form-footer a, .register-page .form-footer a { margin: 14px 0 8px; }
.register-page .app-footer { margin: 0; padding: 0; border: 0; font-size: 0.86rem; }
.register-page .app-footer a { margin: 0; }
.register-page .form-hint { white-space: pre-line; }
/* 戻るリンクは、左向きの芯・金属グリップ・クリップ付きシャープペン。 */
.register-page .form-footer .login-mechanical-pencil {
  position: relative;
  width: min(320px, 100%);
  min-height: 52px;
  margin-inline: auto;
  padding: 10px 24px 10px 54px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  text-decoration: none;
  border-radius: 5px;
  filter: drop-shadow(0 3px 1px rgba(35, 66, 53, 0.24));
}
.mechanical-pencil-shaft { position: absolute; inset: 0 12px 0 24px; border-radius: 4px; background: linear-gradient(to bottom, #83a998 0 16%, #315f51 16% 82%, #234a3e 82%); pointer-events: none; }
.mechanical-pencil-shaft::before { position: absolute; inset: 0 auto 0 0; width: 25px; content: ""; background: repeating-linear-gradient(to right, #a6b8b2 0 2px, #d4dfda 2px 4px); }
.mechanical-pencil-shaft::after { position: absolute; top: 4px; right: 6px; width: 42px; height: 6px; border-radius: 3px; content: ""; background: linear-gradient(#f4f7f5, #9dacaa); box-shadow: 0 1px 1px #234a3e; }
.login-mechanical-pencil::before { position: absolute; top: 0; bottom: 0; left: 0; width: 25px; content: ""; background: linear-gradient(to right, #293d35 0 22%, #c8d5d0 22% 70%, #a1b3ad 70%); clip-path: polygon(0 50%, 100% 8%, 100% 92%); pointer-events: none; }
.login-mechanical-pencil::after { position: absolute; right: 0; top: 14px; bottom: 14px; width: 13px; border-radius: 0 4px 4px 0; content: ""; background: linear-gradient(#e1e8e4, #99aea4); pointer-events: none; }
.mechanical-pencil-label { position: relative; }
.register-page .form-footer .login-mechanical-pencil:hover { color: #fff; filter: brightness(1.08) drop-shadow(0 3px 1px rgba(35, 66, 53, 0.28)); }
.register-page .form-footer .login-mechanical-pencil:active { transform: translateY(1px); }
@media (max-width: 360px) {
  .register-page .form-footer .login-mechanical-pencil { padding: 10px 16px 10px 50px; font-size: 0.85rem; }
}
/* 登録先へのリンクを、ノートに添えた横向きのえんぴつとして描く。 */
.login-page .form-footer .register-pencil {
  position: relative;
  width: min(320px, 100%);
  min-height: 52px;
  margin-inline: auto;
  padding: 10px 40px 10px 42px;
  border-radius: 7px 0 0 7px;
  background: linear-gradient(to bottom, #f7e8b7 0 20%, #efd58d 20% 80%, #daba6d 80% 100%) left center / calc(100% - 28px) 100% no-repeat;
  color: #36483d;
  font-size: 0.95rem;
  line-height: 1.5;
  text-decoration: none;
  filter: drop-shadow(0 3px 1px rgba(83, 67, 39, 0.2));
}
.register-pencil::before,
.register-pencil::after { position: absolute; top: 0; bottom: 0; content: ""; pointer-events: none; }
.register-pencil::before {
  right: 0;
  width: 29px;
  background: linear-gradient(to right, #ddba91 0 68%, #36483d 68% 100%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.register-pencil::after {
  left: 0;
  width: 32px;
  border-radius: 7px 0 0 7px;
  background: linear-gradient(to right, #e5a39b 0 20px, #b2b9af 20px 23px, #e0e3d8 23px 29px, #a1aa9f 29px);
}
.login-page .form-footer .register-pencil:hover { color: #26382d; filter: brightness(1.04) drop-shadow(0 3px 1px rgba(83, 67, 39, 0.25)); }
.login-page .form-footer .register-pencil:active { transform: translateY(1px); }
.login-page .login-privacy-link { margin: 0; font-size: 0.86rem; }
.login-page details.startup-notice, .register-page details.startup-notice { width: fit-content; max-width: 100%; margin: 4px auto 0; }
.login-page details.startup-notice[open], .register-page details.startup-notice[open] { width: 100%; }
.login-page .startup-notice summary, .register-page .startup-notice summary { justify-content: center; padding: 8px 12px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
