:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #1b3549;
  background: #f5f7f8;
  font-size: 16px;
  line-height: 1.65;
  --navy: #1b3549;
  --teal: #278b83;
  --muted: #657684;
  --line: #e3e9ed;
  --gold: #b28a52;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #278b83;
  outline-offset: 3px;
}
a {
  color: var(--teal);
  text-underline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--navy);
  padding: 9px 15px;
  font-size: 0.875rem;
  font-weight: 600;
}
button:hover {
  background: #f1f7f6;
  border-color: #a8c5c1;
}
.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #20756f;
  color: white;
}
.dark {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.danger {
  color: #a13e42;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 5px 0;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 8px;
  background: #eef4f3;
  color: #286c66;
}
.tag.gold {
  background: #f7f0e5;
  color: #896637;
}
.tag.neutral {
  background: #edf0f3;
  color: #657684;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--teal);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8125rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.75rem;
  letter-spacing: 0.015em;
  line-height: 1.5;
}
h2 {
  font-size: 1.0625rem;
  line-height: 1.6;
}
h3 {
  font-size: 1rem;
}
svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
header.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  position: fixed;
  top: 0;
  left: 232px;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}
.topbar .breadcrumb {
  font-size: 0.875rem;
  color: #76838e;
}
.topbar .breadcrumb b {
  color: var(--navy);
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.top-actions .local {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--teal);
  font-size: 0.8125rem;
}
.avatar {
  width: 34px;
  height: 34px;
  background: #edf1f4;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8125rem;
}
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 29px 18px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  padding: 0 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--navy);
  text-decoration: none;
}
.brand-mark {
  height: 34px;
  width: 34px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 5px 3px;
  border-bottom: 2px solid var(--navy);
}
.brand-mark i {
  display: block;
  width: 7px;
  background: var(--navy);
  height: 14px;
  transform: skewY(-18deg);
}
.brand-mark i:nth-child(2) {
  height: 24px;
  background: var(--teal);
}
.brand-mark i:last-child {
  height: 19px;
}
.brand strong {
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}
.brand small {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  display: block;
  color: #84909b;
}
.workspace {
  margin: 35px 7px 27px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.workspace .store-icon {
  width: 31px;
  height: 32px;
  border-radius: 5px;
  background: #f2f5f6;
  display: grid;
  place-items: center;
}
.workspace strong {
  font-size: 0.75rem;
  display: block;
}
.workspace span {
  font-size: 0.6875rem;
  color: var(--muted);
}
.nav-label {
  font-size: 0.6875rem;
  color: #8b98a2;
  letter-spacing: 0.08em;
  padding: 0 15px;
  margin: 12px 0 8px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  border: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 12px 15px;
  font-size: 0.875rem;
  color: #697b89;
  font-weight: 500;
}
.nav button.active {
  background: #eaf3f1;
  color: #20796f;
  font-weight: 700;
}
.sidebar-bottom {
  margin-top: auto;
}
.privacy {
  border-top: 1px solid var(--line);
  margin: 20px 10px 0;
  padding-top: 17px;
  font-size: 0.6875rem;
  color: #89939c;
  line-height: 1.8;
}
.privacy strong {
  color: #526b76;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.app-main {
  margin: 76px 0 0 232px;
  padding: 32px 36px 24px;
  max-width: 1800px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 23px;
}
.page-heading p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 6px;
}
.period-select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.period-select input {
  border: 0;
  width: 150px;
  font-size: 0.875rem;
  color: var(--navy);
  background: white;
}
.demo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eaf1f5;
  border: 1px solid #dce6ec;
  border-radius: 7px;
  padding: 9px 15px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  color: #536b7b;
}
.demo-banner a {
  font-size: 0.8125rem;
  font-weight: 600;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 19px 21px;
  text-align: left;
  position: relative;
}
.stat .stat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #677985;
}
.stat .stat-title svg {
  color: #90a0a9;
  width: 19px;
}
.stat .number {
  font-family: Arial, sans-serif;
  font-size: 2.125rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 10px 0 2px;
  line-height: 1.3;
}
.stat .number small {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0;
}
.stat .foot {
  font-size: 0.6875rem;
  color: #7b8b94;
}
.stat .foot em {
  font-style: normal;
  color: var(--teal);
}
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 22px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 23px 14px;
}
.panel-head .sub {
  font-size: 0.75rem;
  color: #7b8a95;
  margin-top: 3px;
}
.panel-head .text-button {
  font-size: 0.75rem;
}
.panel-content {
  padding: 0 23px 21px;
}
.progress-overview {
  background: #f5f8f8;
  border-radius: 6px;
  padding: 13px 15px;
  margin-bottom: 7px;
}
.progress-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 9px;
}
.progress-title strong {
  color: var(--teal);
}
.track {
  height: 6px;
  background: #e5edec;
  border-radius: 5px;
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 5px;
}
.activity-row {
  padding: 14px 0;
  border-bottom: 1px solid #edf0f2;
  display: grid;
  grid-template-columns: 1fr 82px 88px;
  gap: 13px;
  align-items: center;
}
.activity-row:last-child {
  border-bottom: 0;
}
.activity-name {
  font-size: 0.8125rem;
  font-weight: 500;
}
.activity-name small {
  display: block;
  font-size: 0.6875rem;
  color: #8997a0;
  font-weight: 400;
}
.activity-progress {
  font-size: 0.75rem;
  color: #75848c;
  text-align: right;
}
.activity-progress .track {
  height: 4px;
  margin-top: 7px;
}
.activity-progress b {
  color: var(--navy);
  font-weight: 500;
}
.counter {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}
.counter button {
  height: 33px;
  width: 33px;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 400;
  border-color: #dce5e8;
}
.counter button.add {
  background: #f0f7f5;
  color: var(--teal);
  border-color: #d5e7e2;
}
.panel-note {
  font-size: 0.6875rem;
  color: #8a969e;
  margin-top: 11px;
}
.insight {
  padding: 16px 0;
  border-bottom: 1px solid #edf0f2;
}
.insight:first-child {
  padding-top: 3px;
}
.insight:last-child {
  border: 0;
  padding-bottom: 2px;
}
.insight .tag {
  margin-bottom: 8px;
}
.insight h3 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.8;
}
.insight p {
  font-size: 0.75rem;
  line-height: 1.9;
  color: #6e7d87;
  margin: 6px 0;
}
.insight-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.insight-actions button {
  font-size: 0.6875rem;
}
.insight-actions span {
  font-size: 0.6875rem;
  color: #81918f;
}
.basic-banner {
  background: #f2f7f6;
  border: 1px solid #dfeae7;
  padding: 18px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.ring {
  height: 52px;
  width: 52px;
  border: 5px solid #c8ded8;
  border-top-color: var(--teal);
  border-right-color: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex: none;
}
.basic-banner h3 {
  font-size: 0.8125rem;
}
.basic-banner p {
  font-size: 0.6875rem;
  color: #7b8c89;
  margin-top: 3px;
}
.basic-banner button {
  font-size: 0.6875rem;
  margin-top: 6px;
}
.channel-row {
  display: grid;
  grid-template-columns: 145px 1fr 42px 77px;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.channel-name {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.channel-name i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #6da79e;
}
.channel-bar {
  height: 8px;
  background: #f0f4f4;
  border-radius: 3px;
  overflow: hidden;
}
.channel-bar span {
  display: block;
  background: #7bb2a8;
  height: 100%;
  border-radius: 3px;
}
.channel-row:nth-child(2n) .channel-bar span {
  background: #a3c5bc;
}
.channel-count {
  font-size: 0.8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.channel-row .counter button {
  width: 29px;
  height: 29px;
  font-size: 1rem;
}
.total-line {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-top: 17px;
}
.total-line strong {
  font-size: 1.25rem;
}
.note-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  resize: vertical;
  min-height: 89px;
  padding: 11px 12px;
  font-size: 0.8125rem;
}
.note-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.note-controls select {
  font-size: 0.75rem;
}
.note-excerpt {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 13px;
  color: #72818b;
  font-size: 0.75rem;
  line-height: 1.9;
}
.note-excerpt small {
  display: block;
  color: #9aa4ac;
  font-size: 0.6875rem;
  margin-bottom: 5px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 25px 2px 0;
  font-size: 0.6875rem;
  color: #8b99a2;
}
.market-teaser {
  display: flex;
  gap: 16px;
  align-items: center;
}
.market-art {
  width: 82px;
  height: 65px;
  background: #eef3f3;
  border-radius: 5px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  flex: none;
}
.market-art span {
  display: block;
  width: 12px;
  background: #baccc7;
  height: 23px;
}
.market-art span:nth-child(2) {
  height: 39px;
  background: #7da69b;
}
.market-art span:nth-child(3) {
  height: 31px;
  background: #9dbab0;
}
.market-teaser h3 {
  font-size: 0.8125rem;
}
.market-teaser p {
  font-size: 0.6875rem;
  color: #80918e;
  margin: 4px 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}
.field label,
label.field {
  font-size: 0.875rem;
  font-weight: 500;
}
input,
select,
textarea {
  border: 1px solid #d5dfe4;
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--navy);
  min-width: 0;
}
select {
  padding-right: 28px;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 100px;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--teal);
  width: 17px;
  height: 17px;
  vertical-align: middle;
  margin-right: 8px;
}
input[type="date"] {
  max-width: 200px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.detail-card {
  padding: 24px;
}
.detail-card h2 {
  margin: 12px 0 8px;
}
.detail-card p {
  font-size: 0.875rem;
  color: #657984;
  line-height: 1.9;
  margin: 8px 0;
}
.detail-card .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.check-row {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 20px;
}
.check-row p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 5px;
}
.check-row .small {
  margin-top: 10px;
}
.check-row select {
  align-self: start;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  background: #f7f9fa;
  color: #6c7c87;
  font-weight: 500;
}
.table-scroll {
  overflow: auto;
}
.empty {
  padding: 30px;
  text-align: center;
  color: #7e8e98;
  font-size: 0.875rem;
}
.notice {
  background: #f1f6f7;
  padding: 15px 18px;
  border-radius: 6px;
  color: #607683;
  font-size: 0.8125rem;
  line-height: 1.9;
  margin: 15px 0;
}
.warning {
  background: #fbf5e9;
  color: #80673c;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  max-width: 620px;
  width: calc(100% - 32px);
  max-height: 88vh;
  box-shadow: 0 22px 80px #1b354933;
  color: var(--navy);
}
dialog::backdrop {
  background: #152d4066;
  backdrop-filter: blur(2px);
}
.dialog-body {
  padding: 27px;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dialog-title h2 {
  font-size: 1.2rem;
}
.dialog-title button {
  padding: 2px 10px;
  font-size: 1.4rem;
  border: 0;
}
dialog p {
  font-size: 0.875rem;
  color: #6d7e88;
  margin: 10px 0;
}
.option {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 6px;
  margin: 5px 6px 5px 0;
}
.question {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}
.question h3 {
  margin-bottom: 8px;
}
.survey-sheet h1 {
  text-align: center;
  font-size: 1.5rem;
}
.survey-sheet > p {
  text-align: center;
  font-size: 0.8125rem;
}
.sheet-question {
  border-bottom: 1px solid #d2dbe0;
  padding: 18px 0;
}
.sheet-question p {
  font-size: 0.8125rem;
  margin: 7px 0;
}
.sheet-option {
  display: inline-block;
  margin: 5px 20px 5px 0;
  font-size: 0.875rem;
}
.legal h2 {
  margin: 20px 0 8px;
}
.legal p {
  line-height: 2;
}
.landing {
  background: white;
  min-height: 100vh;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 6%;
  border-bottom: 1px solid var(--line);
}
.landing-hero {
  max-width: 1160px;
  margin: auto;
  padding: 90px 30px 60px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.landing-hero h1 {
  font-size: 2.75rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
  margin: 20px 0;
}
.landing-hero p {
  color: #6d7f89;
  line-height: 2.1;
  font-size: 0.9375rem;
}
.landing-hero .actions {
  display: flex;
  gap: 12px;
  margin: 30px 0 16px;
}
.landing-hero .actions button {
  padding: 14px 22px;
}
.hero-preview {
  background: #f3f7f6;
  padding: 30px;
  border-radius: 9px;
  transform: rotate(-2deg);
}
.hero-preview .panel {
  padding: 26px;
}
.hero-preview h3 {
  margin-bottom: 22px;
}
.hero-mini {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.hero-mini strong {
  color: var(--teal);
}
.principles {
  max-width: 1100px;
  padding: 30px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.principles article {
  padding: 25px 0;
  border-top: 2px solid #dce8e5;
}
.principles h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}
.principles p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.9;
}
.mobile-menu {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 12px 22px;
  box-shadow: 0 5px 20px #1b354922;
  border-radius: 7px;
  font-size: 0.875rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
}
#print-area {
  display: none;
}
.loading {
  margin: 60px;
}
.review-chart {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  height: 150px;
  border-bottom: 1px solid var(--line);
  padding: 10px;
}
.review-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--muted);
}
.review-col .bar {
  width: 65%;
  max-width: 45px;
  background: #77aaa1;
  border-radius: 3px 3px 0 0;
}
.inline-actions {
  display: flex;
  gap: 7px;
}
.inline-actions button {
  font-size: 0.75rem;
  padding: 5px 9px;
}
.save-state {
  font-size: 0.75rem;
  color: var(--teal);
}
.span-2 {
  grid-column: 1/-1;
}
.metric-option {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.title-actions {
  display: flex;
  gap: 10px;
}
.restore-preview {
  border: 1px solid #d9e7e2;
  padding: 16px;
  border-radius: 7px;
  margin-top: 15px;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.chip-row button.active {
  background: var(--navy);
  color: white;
}
.error-text {
  color: #a13e42;
  font-size: 0.875rem;
}
@media (min-width: 1500px) {
  .app-main {
    padding: 36px 50px;
  }
  .grid-main {
    grid-template-columns: 1.7fr 1fr;
  }
  .activity-row {
    padding: 17px 0;
  }
  .channel-row {
    margin: 15px 0;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
    padding: 25px 12px;
  }
  .brand {
    padding: 0 6px;
  }
  .brand strong {
    font-size: 0.8125rem;
  }
  header.topbar {
    left: 205px;
    padding: 0 24px;
  }
  .app-main {
    margin-left: 205px;
    padding: 26px 24px;
  }
  .grid-main {
    grid-template-columns: minmax(0, 1.4fr) minmax(285px, 1fr);
    gap: 16px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .panel-head {
    padding: 18px 18px 12px;
  }
  .panel-content {
    padding: 0 18px 18px;
  }
  .channel-row {
    grid-template-columns: 110px 1fr 28px 67px;
    gap: 6px;
  }
  .channel-name {
    font-size: 0.6875rem;
  }
  .activity-row {
    grid-template-columns: 1fr 60px 75px;
    gap: 8px;
  }
  .workspace {
    padding: 10px 6px;
  }
}
@media (max-width: 950px) {
  .grid-main {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack {
    gap: 18px;
  }
  .channel-row {
    grid-template-columns: 150px 1fr 40px 80px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }
  .hero-preview {
    display: none;
  }
  .principles {
    grid-template-columns: 1fr;
  }
  .top-actions .local {
    display: none;
  }
}
@media (max-width: 650px) {
  :root {
    font-size: 16px;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 245px;
    box-shadow: 4px 0 30px #1b354922;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  header.topbar {
    left: 0;
    padding: 0 16px;
    height: 60px;
  }
  .mobile-menu {
    display: inline-flex;
    border: 0;
    padding: 6px;
  }
  .breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .topbar .breadcrumb > span {
    display: none;
  }
  .top-actions {
    gap: 10px;
  }
  .top-actions > span {
    display: none;
  }
  .app-main {
    margin: 60px 0 0;
    padding: 22px 15px;
  }
  .page-heading {
    align-items: start;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 1.4rem;
  }
  .page-heading p {
    font-size: 0.75rem;
    max-width: 210px;
  }
  .period-select {
    padding: 5px 7px;
    gap: 3px;
  }
  .period-select svg {
    display: none;
  }
  .period-select input {
    width: 122px;
    font-size: 0.75rem;
  }
  .demo-banner {
    font-size: 0.6875rem;
    padding: 9px 12px;
    gap: 10px;
  }
  .demo-banner a {
    font-size: 0.6875rem;
    white-space: nowrap;
  }
  .stats {
    gap: 10px;
    margin-bottom: 17px;
  }
  .stat {
    padding: 14px;
  }
  .stat .stat-title {
    font-size: 0.75rem;
  }
  .stat .number {
    font-size: 1.875rem;
  }
  .stat .foot {
    font-size: 0.625rem;
  }
  .grid-main {
    gap: 17px;
  }
  .panel-head {
    padding: 18px 16px 13px;
  }
  .panel-content {
    padding: 0 16px 18px;
  }
  .activity-row {
    grid-template-columns: 1fr 58px 79px;
    gap: 10px;
    padding: 15px 0;
  }
  .activity-name {
    font-size: 0.75rem;
  }
  .activity-name small {
    font-size: 0.6875rem;
  }
  .counter button {
    height: 36px;
    width: 36px;
  }
  .channel-row {
    grid-template-columns: 117px 1fr 29px 77px;
    gap: 6px;
    margin: 14px 0;
  }
  .channel-name {
    font-size: 0.6875rem;
  }
  .channel-row .counter button {
    height: 35px;
    width: 35px;
  }
  .channel-row .counter {
    gap: 5px;
  }
  .panel-note {
    font-size: 0.6875rem;
  }
  .check-row {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 12px;
  }
  .check-row select {
    width: 100%;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .detail-card {
    padding: 20px;
  }
  .title-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  footer {
    flex-direction: column;
    gap: 6px;
    padding-top: 24px;
  }
  .landing-nav {
    padding: 18px 15px;
  }
  .landing-nav .brand strong {
    font-size: 0.8125rem;
  }
  .landing-nav > div {
    display: flex;
    gap: 5px;
  }
  .landing-nav button {
    padding: 8px;
    font-size: 0.75rem;
  }
  .landing-hero {
    padding: 50px 22px 25px;
    gap: 10px;
  }
  .landing-hero h1 {
    font-size: 2rem;
  }
  .landing-hero .actions {
    flex-direction: column;
  }
  .principles {
    padding: 20px 22px;
    gap: 5px;
  }
  .dialog-body {
    padding: 20px;
  }
  .data-table {
    min-width: 650px;
  }
  .survey-sheet {
    padding: 18px;
  }
  .topbar button.text-button {
    font-size: 0.75rem;
  }
  .option {
    padding: 9px;
    font-size: 0.8125rem;
  }
}
@media print {
  @page {
    size: A4;
    margin: 16mm;
  }
  body {
    background: white;
    color: black;
  }
  #app,
  dialog,
  #toast {
    display: none !important;
  }
  #print-area {
    display: block;
    font-size: 11pt;
  }
  .survey-sheet h1 {
    font-size: 19pt;
  }
  .sheet-question {
    break-inside: avoid;
    padding: 20px 0;
  }
  .sheet-option {
    font-size: 10pt;
  }
  a {
    color: black;
    text-decoration: none;
  }
}
.sidebar {
  overflow-y: auto;
}
.brand strong {
  font-size: 0.8125rem;
  white-space: nowrap;
}
.brand {
  padding-left: 5px;
  padding-right: 0;
}
.brand-mark {
  flex: none;
}
.workspace {
  min-width: 0;
}
.workspace > div:last-child {
  min-width: 0;
}
.workspace strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace span {
  font-size: 0.625rem;
}
.privacy .icon {
  width: 13px;
  height: 13px;
  vertical-align: middle;
}
.sidebar-bottom {
  padding-top: 20px;
}
/* Phase 2: retain the approved visual system; improve reading and touch targets. */
.panel-head .sub,
.panel-note,
.small,
.stat .foot,
.activity-name,
.activity-name small,
.activity-progress,
.channel-name,
.insight p,
.note-excerpt,
.data-table,
.privacy,
.workspace span {
  font-size: 0.875rem;
  line-height: 1.8;
}
.stat .stat-title {
  font-size: 0.875rem;
}
.insight h3 {
  font-size: 1rem;
}
.panel-head .text-button,
.insight-actions button {
  font-size: 0.875rem;
}
.track {
  height: 9px;
}
.activity-progress .track {
  height: 7px;
}
.channel-bar {
  height: 10px;
}
.counter button,
.channel-row .counter button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 1.25rem;
}
.counter {
  gap: 7px;
}
.activity-row {
  grid-template-columns: minmax(0, 1fr) 72px 95px;
  padding: 16px 0;
}
.channel-row {
  grid-template-columns: 145px minmax(30px, 1fr) 35px 95px;
  margin: 14px 0;
}
.stat {
  min-height: 145px;
}
.stats .number {
  font-size: 2rem;
}
.nav button {
  line-height: 1.5;
}
.workspace strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: 0.875rem;
}
.workspace {
  align-items: start;
}
.brand strong {
  font-size: 0.8125rem;
}
.filter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 16px 0;
}
.filter-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  flex: 1;
  min-width: 130px;
}
.filter-form input,
.filter-form select {
  width: 100%;
}
.filter-form .checkbox-filter {
  display: block;
  min-width: 150px;
}
.filter-form .checkbox-filter input {
  width: 17px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0;
  font-size: 0.875rem;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.history-grid {
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.4fr);
  align-items: start;
}
.survey-layout {
  align-items: start;
}
.check-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.check-group > summary {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  list-style: none;
}
.check-group summary strong {
  font-size: 1rem;
}
.check-group summary small {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 5px;
}
.check-group > summary > .muted {
  font-size: 0.8125rem;
  white-space: nowrap;
}
.check-detail {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.check-detail p {
  font-size: 0.875rem;
  line-height: 1.9;
  margin-top: 8px;
  color: #627785;
}
.check-detail > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex: none;
}
.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.lesson h3 {
  margin: 25px 0 10px;
}
.lesson p {
  font-size: 1rem;
  line-height: 2;
}
.lesson .toolbar {
  margin-top: 24px;
}
.lesson details p {
  font-size: 0.875rem;
}
.market-number {
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.month-card {
  padding: 22px;
}
.month-card h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.month-card > div {
  margin-top: 14px;
}
.month-card .text-button {
  display: block;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.9;
  margin: 8px 0;
}
.current-month {
  border-top: 3px solid var(--teal);
}
.plan-line {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 15px;
}
.plan-line strong {
  font-size: 0.875rem;
}
.timeline-item {
  border-left: 2px solid #d8e6e2;
  padding: 0 0 17px 16px;
  margin-left: 4px;
}
.timeline-item h3 {
  font-size: 0.9375rem;
}
.timeline-item p {
  margin-top: 5px;
}
.technical-details {
  font-size: 0.875rem;
  margin: 10px 0;
}
.technical-details summary {
  cursor: pointer;
  color: var(--muted);
}
.review-chart {
  height: 200px;
  overflow-x: auto;
  gap: 12px;
}
.review-col {
  min-width: 38px;
  font-size: 0.75rem;
}
.review-col > span:first-child {
  min-height: 24px;
  white-space: nowrap;
}
.review-col .bar {
  flex-shrink: 0;
}
.monthly-report {
  font-size: 11pt;
  line-height: 1.8;
}
.report-section {
  break-inside: avoid;
  border-top: 1px solid #c5cdd2;
  padding: 15px 0;
}
.report-section p {
  white-space: normal;
}
.checkbox-filter input {
  margin-left: 0;
}
.empty p {
  margin-bottom: 10px;
}
.offline-banner {
  background: #fff3d7;
  border: 1px solid #e5d09c;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}
@media (min-width: 651px) {
  .sidebar {
    width: 244px;
  }
  .app-main {
    margin-left: 244px;
  }
  header.topbar {
    left: 244px;
  }
  .nav button {
    font-size: 0.875rem;
    white-space: nowrap;
  }
  .sidebar .privacy {
    font-size: 0.75rem;
  }
  .workspace {
    margin-top: 25px;
  }
}
@media (max-width: 1100px) {
  .history-grid,
  .check-groups {
    grid-template-columns: 1fr;
  }
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .channel-row {
    grid-template-columns: 135px minmax(30px, 1fr) 30px 95px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    width: 260px;
    visibility: hidden;
  }
  .sidebar.open {
    visibility: visible;
  }
  .app-main {
    padding: 20px 15px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading > div:first-child {
    flex: 1;
    min-width: 190px;
  }
  .page-heading h1 {
    font-size: 1.4rem;
  }
  .page-heading p {
    max-width: none;
    font-size: 0.875rem;
  }
  .period-select {
    margin-left: auto;
  }
  .stats .number {
    font-size: 1.65rem;
  }
  .stat {
    padding: 15px 12px;
    min-height: 145px;
  }
  .stat .foot {
    font-size: 0.8125rem;
  }
  .activity-row {
    grid-template-columns: minmax(0, 1fr) 55px 95px;
    gap: 9px;
  }
  .channel-row {
    grid-template-columns: 128px minmax(15px, 1fr) 23px 95px;
    gap: 4px;
  }
  .channel-name {
    font-size: 0.8125rem;
    gap: 5px;
  }
  .channel-name i {
    width: 5px;
    flex: none;
  }
  .activity-name {
    font-size: 0.875rem;
  }
  .activity-name small,
  .activity-progress {
    font-size: 0.8125rem;
  }
  .channel-count {
    font-size: 0.875rem;
  }
  .check-detail {
    flex-direction: column;
  }
  .check-detail > div:last-child {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .learning-grid,
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .filter-form label {
    min-width: 120px;
  }
  .check-group > summary {
    padding: 18px;
  }
  .market-number {
    font-size: 1.8rem;
  }
  .toolbar > button {
    min-height: 44px;
  }
  .data-table th,
  .data-table td {
    padding: 12px;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .month-card {
    padding: 20px;
  }
}
@media print {
  .monthly-report h1 {
    font-size: 19pt;
  }
  .monthly-report h2 {
    font-size: 13pt;
  }
  .monthly-report h3 {
    font-size: 11pt;
  }
  .monthly-report .timeline-item {
    break-inside: avoid;
  }
  .monthly-report .small {
    font-size: 10pt;
  }
  .survey-sheet {
    padding: 0;
  }
  .sheet-question h3 {
    font-size: 12pt;
  }
  .sheet-option {
    font-size: 11pt;
  }
}
.workspace strong {
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
  font-size: 0.8125rem;
}
.workspace span {
  font-size: 0.75rem;
  letter-spacing: -0.02em;
  word-break: keep-all;
  line-height: 1.9;
}
.upcoming-ideas {
  margin: 10px 0 20px;
  align-items: start;
}
.upcoming-ideas .text-button {
  display: block;
  text-align: left;
  margin: 10px 0;
}
.review-col > span:last-child {
  max-width: 65px;
  text-align: center;
  white-space: normal;
}

/* Phase 2.1: a neutral sample selector keeps specialized demos out of the default headline. */
.demo-banner {
  flex-wrap: wrap;
  gap: 12px;
}
.demo-sample {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.demo-sample select {
  max-width: 100%;
  min-height: 44px;
}
