:root {
  color-scheme: light;
  --bg: #fcf8fb;
  --surface: #fff;
  --ink: #302338;
  --muted: #6c596d;
  --border: #eadde7;
  --accent: #794574;
  --accent-dark: #63365f;
  --lilac: #f8e6f2;
  --sidebar: #fff6fa;
  --sidebar-selected: #f5e2ef;
  --radius: 16px;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.25rem); line-height: 1.25; letter-spacing: -.045em; }
h2 { font-size: 1.15rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #97619a; outline-offset: 3px; }
svg { flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.loading { margin: 3rem; color: var(--muted); }
.muted { color: var(--muted); font-size: .875rem; }

.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(390px, 44%) 1fr; }
.login-copy { background: var(--surface); padding: clamp(28px, 5.5vw, 86px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.login-brand, .side-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { position: relative; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border: 1px solid #f0d8e8; border-radius: 14px; background: #fbedf6; }
.brand-mark img { position: absolute; left: -21px; top: -13px; width: 82px; height: auto; mix-blend-mode: multiply; }
.brand-type { font-size: 1.4rem; font-weight: 850; letter-spacing: -.035em; white-space: nowrap; }
.brand-caption { font-size: .8rem; color: var(--muted); border-left: 1px solid var(--border); padding-left: 12px; }
.login-form { display: grid; justify-items: start; gap: 20px; }
.login-form h1 { font-size: clamp(2.9rem, 5.5vw, 5.25rem); line-height: 1.1; }
.login-form > p:not(.form-error) { color: var(--muted); }
.login-form small, .login-foot { color: var(--muted); font-size: .8rem; }
.google-button { display: inline-flex; gap: 12px; align-items: center; justify-content: center; min-height: 50px; width: min(100%, 280px); margin-top: 8px; padding: 10px 16px; border: 1px solid #decfdc; border-radius: 10px; font-weight: 700; background: white; }
.google-button:hover { background: #fff7fb; border-color: #ab81a2; }
.login-visual {
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #faeaf4;
  background-image:
    radial-gradient(ellipse at 18% 14%, #fff5eb 0, transparent 58%),
    radial-gradient(ellipse at 86% 86%, #e1eafe 0, transparent 65%),
    radial-gradient(#b477a346 1px, transparent 1px);
  background-size: auto, auto, 19px 19px;
  padding: 36px 24px;
}
.mascot-stage {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: min(86%, 460px);
  aspect-ratio: 1;
  border: 1px solid #fffbfe;
  border-radius: 54% 46% 55% 45% / 45% 56% 44% 55%;
  background: #fff9fc;
  box-shadow: 0 22px 58px #73456d19;
}
.mascot-stage::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px dashed #dabbd4;
  border-radius: inherit;
}
.mascot-stage img { width: 67%; height: auto; mix-blend-mode: multiply; }

.layout { min-height: 100dvh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: var(--sidebar); color: var(--ink); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 24px 15px 15px; }
.side-brand { margin: 1px 11px 35px; }
.side-content { flex: 1; overflow: auto; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 9px; text-align: left; color: var(--muted); padding: 10px 11px; min-height: 46px; font-size: .875rem; margin-bottom: 4px; }
.side-link:hover, .side-link.selected { background: var(--sidebar-selected); color: var(--accent-dark); }
.side-link.selected { font-weight: 750; }
.side-link .project-icon { width: 24px; height: 24px; border-radius: 6px; }
.side-link .project-icon svg { width: 14px; }
.nav-label { color: var(--muted); font-weight: 700; font-size: .78rem; margin: 29px 11px 9px; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 13px 4px 0; border-top: 1px solid var(--border); }
.profile strong, .profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile strong { font-size: .84rem; }
.profile small { color: var(--muted); font-size: .75rem; }
.profile .icon-button { color: var(--muted); }
.profile .icon-button:hover { background: var(--sidebar-selected); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lilac); color: var(--accent-dark); flex-shrink: 0; font-size: .8rem; font-weight: 750; }
.main-pane { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 67px; padding: 0 clamp(18px, 4vw, 51px); }
.top-actions, .breadcrumbs { display: flex; align-items: center; gap: 10px; }
.breadcrumbs { color: var(--muted); font-size: .875rem; }
.breadcrumbs strong { color: var(--ink); }
.breadcrumbs [data-action="menu"] { display: none; }
.icon-button { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--lilac); color: var(--accent-dark); }
.badge { position: absolute; top: -2px; right: -3px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; border: 2px solid #fff; border-radius: 10px; background: #86537f; color: white; font-weight: 700; font-size: .66rem; }
.content { margin-inline: auto; max-width: 1480px; padding: clamp(22px, 4vw, 52px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 23px; }
.page-heading p { color: var(--muted); margin-top: 8px; }
.dashboard-heading {
  align-items: center;
  min-height: 138px;
  padding: clamp(14px, 2.5vw, 26px);
  border: 1px solid #ead7e6;
  border-radius: 22px;
  background: linear-gradient(110deg, #fdf0f6 35%, #f8e9f3 72%, #e9effc);
}
.dashboard-mascot { flex: 0 0 auto; align-self: center; padding-right: clamp(0px, 3vw, 28px); }
.dashboard-mascot img { display: block; width: clamp(78px, 12vw, 108px); height: auto; mix-blend-mode: multiply; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; border-radius: 9px; border: 1px solid transparent; padding: 8px 14px; font-size: .875rem; font-weight: 750; white-space: nowrap; }
.button.primary { color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: #e4d7e2; }
.button.secondary:hover { background: #fff7fb; border-color: #c399bb; }
.button.complete-button { background: #def4e8; color: #176749; }
.button.complete-button:hover { background: #c7ecda; }
.stats, .project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.stat { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 15px 17px; min-width: 0; display: flex; align-items: center; gap: 13px; }
.stat p { color: var(--muted); font-size: .875rem; }
.stat strong { display: block; margin-top: 1px; line-height: 1.15; font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.stat-icon, .project-icon, .empty-icon, .notice-icon { display: inline-grid; place-items: center; width: 41px; height: 41px; border-radius: 11px; flex-shrink: 0; }
.violet, .empty-icon, .notice-icon { background: var(--lilac); color: var(--accent-dark); }
.cyan { background: #e7eefc; color: #385d95; }
.amber { background: #fff0d5; color: #895309; }
.projects, .issue-section { margin-top: 27px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.count { font-size: .78rem; font-weight: 750; color: var(--muted); background: #f5eaf2; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.project-card { display: flex; gap: 10px; align-items: center; padding: 13px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; color: var(--muted); }
.project-card:hover { border-color: #bc91b2; color: var(--accent); }
.project-titles { flex: 1; min-width: 0; }
.project-titles strong, .project-titles small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-titles strong { color: var(--ink); font-size: .875rem; }
.project-titles small { font-size: .78rem; }
.empty-projects { color: var(--muted); grid-column: 1 / -1; }
.issue-panel { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 12px; border-bottom: 1px solid var(--border); }
.search, select, input:not([type="checkbox"]):not([type="search"]), textarea { border: 1px solid #e3d6e0; border-radius: 8px; min-height: 39px; padding: 7px 10px; background: #fff; width: 100%; }
.search { display: flex; align-items: center; gap: 6px; width: min(100%, 255px); color: var(--muted); }
.search:focus-within { outline: 2px solid #97619a; }
.search input { border: 0; background: transparent; width: 100%; min-width: 0; outline: none; font-size: .875rem; }
select { appearance: none; padding-right: 29px; background-image: linear-gradient(45deg, transparent 50%, #795e77 50%), linear-gradient(135deg, #795e77 50%, transparent 50%); background-repeat: no-repeat; background-size: 5px 5px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; overflow: hidden; text-overflow: ellipsis; }
.filters select, .mine-filter { font-size: .875rem; }
.mine-filter { display: flex; align-items: center; gap: 4px; color: var(--muted); padding: 4px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.sort { margin-left: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { color: var(--muted); font-weight: 650; background: #fff8fc; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; width: 48%; min-width: 225px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffbfd; }
.issue-link { display: grid; gap: 3px; text-align: left; border: 0; background: none; padding: 0; white-space: normal; overflow-wrap: anywhere; }
.issue-link > span { color: var(--accent); font-size: .75rem; font-weight: 750; }
.issue-link:hover strong { text-decoration: underline; color: var(--accent-dark); }
.assignee { display: inline-flex; align-items: center; gap: 6px; }
.assignee .avatar { width: 25px; height: 25px; font-size: .7rem; }
.overdue { font-weight: 700; color: #b3294b; }
.row-star { color: #885317; }
.pill { display: inline-flex; gap: 6px; align-items: center; border-radius: 20px; padding: 4px 9px; font-weight: 750; font-size: .8rem; background: #f2ebf1; color: #645367; white-space: nowrap; }
.pill > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { color: #36538c; background: #e8eefc; }
.pill.review { color: #864e08; background: #fff1d9; }
.pill.done { color: #126546; background: #e3f6ec; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 32px 15px; text-align: center; }
.empty p { color: var(--muted); font-size: .875rem; }
.empty .button { margin-top: 6px; }

dialog { background: var(--surface); color: var(--ink); padding: 0; border: 1px solid var(--border); border-radius: 17px; width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 24px 90px #201a3640; overflow: auto; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #201a365b; }
#notification-dialog { width: min(480px, calc(100% - 24px)); }
.dialog-header { padding: 18px 21px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.dialog-header h2 { font-size: 1.4rem; overflow-wrap: anywhere; }
.dialog-header p { color: var(--muted); font-size: .875rem; }
.dialog-header .icon-button { flex: 0 0 38px; }
.detail-key { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .78rem; margin-bottom: 7px; }
.detail-key .project-icon { width: 23px; height: 23px; border-radius: 6px; }
.detail-key .project-icon svg { width: 13px; }
.detail-key strong { color: var(--accent); }
.detail-body, .inbox-content { overflow-y: auto; min-height: 0; }
.detail-body, .edit-form { padding: 19px 21px; }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.star-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: white; color: var(--muted); font-size: .8rem; }
.star-button:hover, .star-button.starred { border-color: #e7c583; color: #804c08; background: #fff4dc; }
.star-button.starred svg { fill: #f6bf56; }
.properties { display: flex; flex-wrap: wrap; gap: 13px 30px; margin: 17px 0; padding: 12px 14px; background: #fbf5fa; border-radius: 10px; }
.properties dt { color: var(--muted); font-size: .8rem; margin-bottom: 3px; }
.properties dd { margin: 0; font-size: .875rem; }
.description p, .comment-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 7px; }
.comments { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 14px; }
.comments > h3 { margin-bottom: 9px; }
.comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; border-top: 1px solid var(--border); padding: 10px 0; }
.comment header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .875rem; }
.comment header small { color: var(--muted); }
.change { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.mention { color: var(--accent-dark); background: var(--lilac); padding: 1px 4px; border-radius: 4px; font-weight: 650; }
.edit-form, .edit-form label, .compose-fields label { display: grid; gap: 7px; min-width: 0; font-weight: 650; font-size: .875rem; }
.edit-form { gap: 13px; overflow-y: auto; }
.edit-form label { display: block; }
.edit-form label > input, .edit-form label > textarea, .edit-form label > select { display: block; margin-top: 5px; font-weight: 400; }
textarea { resize: vertical; }
.edit-grid, .compose-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; align-items: end; }
.required { color: #9a2e50; font-size: .75rem; margin-left: 5px; }
.edit-form footer { display: flex; justify-content: flex-end; gap: 8px; }
.form-error { font-size: .875rem; color: #a92648; }
.comment-form { margin-top: 13px; border: 1px solid var(--border); padding: 10px; border-radius: 10px; }
.compose-tools { display: flex; align-items: center; gap: 3px; position: relative; }
.compose-fields { grid-template-columns: minmax(90px, .75fr) minmax(115px, 1.3fr) auto; }
.compose-fields select { font-weight: 400; }
.picker { position: absolute; z-index: 1; bottom: 43px; left: 0; max-height: 225px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; background: #fff; box-shadow: 0 8px 30px #251b4220; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 32px); padding: 5px; }
.emoji-grid button, .mention-option { border: 0; background: transparent; border-radius: 6px; padding: 4px; }
.emoji-grid button:hover, .mention-option:hover { background: var(--lilac); }
.mention-option { display: flex; gap: 7px; align-items: center; text-align: left; width: 100%; padding: 6px 9px; }
.mention-option small, .mention-option b { display: block; font-size: .8rem; }
.mention-option small { color: var(--muted); }
.inbox-toolbar { padding: 10px 14px; display: flex; justify-content: flex-end; }
.notice { border: 0; border-top: 1px solid var(--border); background: #fff; text-align: left; width: 100%; display: flex; gap: 9px; align-items: center; padding: 10px 14px; }
.notice:hover, .notice.unread { background: #fdf1f9; }
.notice-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice-content small { display: block; color: var(--muted); font-size: .8rem; }
.unread-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
.toast { position: fixed; bottom: 19px; right: 19px; z-index: 2; background: var(--ink); color: #fff; padding: 12px 15px; max-width: min(390px, calc(100% - 38px)); border-radius: 10px; box-shadow: 0 8px 24px #201a3640; font-size: .875rem; }
@media (max-width: 1020px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 10px; gap: 8px; }
  .stat-icon { width: 33px; height: 33px; }
}
@media (max-width: 800px) {
  .login { grid-template-columns: 1fr; }
  .login-copy { min-height: 60dvh; }
  .login-visual { min-height: 270px; }
  .mascot-stage { width: min(64%, 325px); }
  .wide-only { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.mobile-open { display: flex; position: fixed; top: 59px; left: 0; width: min(270px, 85%); height: calc(100dvh - 59px); z-index: 2; box-shadow: 0 12px 30px #201a3650; }
  .topbar { min-height: 59px; padding-inline: 12px; }
  .breadcrumbs [data-action="menu"] { display: inline-grid; }
}
@media (max-width: 480px) {
  .breadcrumbs > span, .breadcrumbs > svg { display: none; }
  .stats { gap: 6px; }
  .stat { align-items: flex-start; flex-direction: column; gap: 4px; padding: 8px 7px; }
  .stat p { font-size: .78rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .project-grid, .edit-grid { grid-template-columns: 1fr; }
  .sort { margin-left: 0; }
  .search { width: 100%; }
  .dashboard-heading { flex-direction: row; align-items: center; min-height: 112px; gap: 8px; }
  .dashboard-heading h1 { font-size: 1.42rem; }
  .dashboard-heading p { font-size: .875rem; }
  .compose-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .compose-fields button { grid-column: 1 / -1; justify-self: end; }
}

.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-form .project-checkbox { display: flex; align-items: center; }
.edit-form .project-checkbox > input { margin: 0; }
.edit-form textarea:disabled { background: var(--bg); }
.consent-page { min-height: 100dvh; display: grid; place-items: center; padding: 18px; }
.consent-card { background: var(--surface); padding: clamp(20px, 5vw, 36px); border: 1px solid var(--border); border-radius: var(--radius); width: min(100%, 540px); overflow-wrap: anywhere; }
.consent-card h1 { font-size: clamp(1.4rem, 4vw, 1.85rem); }
.consent-card p { margin-top: 12px; }
.consent-card form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }

#import-preview { display: grid; gap: 10px; }
.import-summary { background: var(--bg); padding: 11px 13px; border-radius: 9px; font-weight: 400; }
.import-sample { list-style: none; padding: 0; margin: 0; }
.import-sample li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 3px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.import-map { min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: 9px; }
.import-map label { margin-top: 7px; }
.import-source { margin-top: 13px; color: var(--muted); font-size: .875rem; }
.import-source summary { cursor: pointer; }
.import-source dd { white-space: pre-wrap; overflow-wrap: anywhere; }

.organization-link { color: var(--accent-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.organization-name { color: var(--muted); font-size: .875rem; font-weight: 700; margin: 0 11px 12px; overflow-wrap: anywhere; }
.registration { display: grid; gap: 12px; overflow-wrap: anywhere; }
.registration > p { color: var(--muted); }
.registration .edit-form { padding: 8px 0 0; }
