:root {
  --ink: #122033;
  --muted: #65748a;
  --line: #dfe8f2;
  --line-strong: #cbd9e8;
  --page: #eaf2f9;
  --surface: #ffffff;
  --surface-soft: #f6faff;
  --blue: #2688e8;
  --blue-dark: #126bc4;
  --blue-soft: #e6f3ff;
  --green: #2fbf83;
  --green-dark: #15744f;
  --green-soft: #e6f8ef;
  --yellow: #fff4cb;
  --yellow-line: #efd77a;
  --shadow: 0 18px 48px rgba(35, 88, 128, 0.14);
  --soft-shadow: 0 8px 20px rgba(35, 88, 128, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(38, 136, 232, 0.12), transparent 32%),
    linear-gradient(180deg, #f7fbff 0%, var(--page) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.5;
}

button {
  color: inherit;
  font: inherit;
}

svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.desktop-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.desktop-shell {
  position: relative;
  width: min(1440px, 100%);
  height: min(856px, calc(100vh - 44px));
  min-height: 760px;
  overflow: hidden;
  background: rgba(247, 251, 255, 0.96);
  border: 1px solid rgba(203, 217, 232, 0.82);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.app-header {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  height: 64px;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.brand small,
.header-greeting p,
.header-greeting span {
  display: block;
}

.brand strong {
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
}

.brand small,
.header-greeting span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.logo-mark {
  display: inline-block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  background-image: url("../../assets/D52BBFF2-551F-427C-AC5A-60C9EB6AA7DA.PNG");
  background-repeat: no-repeat;
  background-size: 470px auto;
  background-position: -31px -138px;
  border-radius: 14px;
}

.header-greeting {
  min-width: 0;
}

.header-greeting p {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-button,
.user-chip,
.nav-item,
.site-card,
.summary-card {
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.icon-button,
.user-chip {
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  color: var(--blue-dark);
  border-radius: 15px;
}

.notice-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border: 2px solid #ffffff;
  border-radius: 999px;
}

.user-chip {
  width: 38px;
  height: 38px;
  color: var(--blue-dark);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
}

.app-body {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  height: calc(100% - 64px);
  min-height: 0;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.54);
  border-right: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 39px;
  padding: 0 12px;
  color: #314157;
  background: transparent;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.nav-item.is-active {
  box-shadow: inset 0 0 0 1px rgba(38, 136, 232, 0.18);
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  content: "";
  border-radius: 5px;
}

.home-icon::before {
  inset: 3px 2px 2px;
  border: 2px solid currentColor;
  border-top-width: 7px;
}

.site-icon::before {
  inset: 2px;
  border: 2px solid currentColor;
}

.site-icon::after {
  left: 6px;
  bottom: 3px;
  width: 6px;
  height: 5px;
  background: currentColor;
}

.note-icon::before {
  inset: 2px 3px;
  border: 2px solid currentColor;
}

.note-icon::after {
  left: 6px;
  top: 7px;
  width: 7px;
  height: 2px;
  background: currentColor;
}

.receipt-icon::before {
  inset: 1px 4px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.receipt-icon::after {
  left: 7px;
  top: 7px;
  width: 5px;
  height: 2px;
  background: currentColor;
}

.file-icon::before {
  inset: 1px 4px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.file-icon::after {
  right: 4px;
  top: 1px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 2px 0 2px;
}

.setting-icon::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.setting-icon::after {
  left: 8px;
  top: 0;
  width: 2px;
  height: 18px;
  background: currentColor;
}

.content-area {
  min-width: 0;
  overflow: hidden;
  padding: 13px 16px 16px;
}

.today-section,
.panel,
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.today-section {
  padding: 13px;
}

.section-head,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-label {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.35;
}

.sync-pill,
.soft-count,
.site-state,
.status-chip,
.doc-note,
.file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.sync-pill,
.soft-count,
.status-chip.done {
  color: var(--green-dark);
  background: var(--green-soft);
}

.site-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.site-card {
  min-height: 78px;
  padding: 10px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
}

.site-card:hover,
.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(35, 88, 128, 0.12);
}

.site-card.is-selected {
  background: var(--yellow);
  border-color: var(--yellow-line);
  box-shadow: 0 14px 28px rgba(191, 152, 36, 0.13);
}

.site-card h2 {
  margin-top: 4px;
  font-size: 16px;
}

.site-card time,
.site-card p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.in-progress {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.pending {
  color: #8a6700;
  background: var(--yellow);
  border: 1px solid rgba(239, 215, 122, 0.84);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.summary-card {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 10px;
  text-align: left;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.summary-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card.is-hot {
  border-color: rgba(239, 215, 122, 0.88);
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.summary-card.is-pressed {
  transform: scale(0.985);
  border-color: rgba(38, 136, 232, 0.36);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(420px, 1.24fr);
  gap: 10px;
  align-items: start;
}

.left-stack {
  display: grid;
  gap: 6px;
  align-self: start;
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 10px;
}

.recent-list,
.incoming-list,
.document-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.recent-site,
.incoming-item,
.document-item {
  display: grid;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.recent-site {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.recent-site p,
.incoming-item p,
.document-item p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.thumb {
  width: 30px;
  height: 30px;
  border-radius: 12px;
}

.blue-thumb {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), transparent 40%),
    linear-gradient(135deg, #7bc7ff, #2688e8);
}

.yellow-thumb {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 40%),
    linear-gradient(135deg, #ffe58a, #ffc64d);
}

.green-thumb {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 40%),
    linear-gradient(135deg, #7be0ae, #2fbf83);
}

.incoming-panel {
  align-self: start;
  background:
    linear-gradient(180deg, rgba(230, 243, 255, 0.72), rgba(255, 255, 255, 0) 34%),
    var(--surface);
}

.incoming-item {
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
}

.incoming-item.is-unread {
  background: #ffffff;
  border-color: rgba(38, 136, 232, 0.2);
  box-shadow: 0 8px 18px rgba(35, 88, 128, 0.07);
}

.incoming-icon {
  position: relative;
  width: 32px;
  height: 32px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 13px;
}

.incoming-icon::before,
.incoming-icon::after {
  position: absolute;
  content: "";
}

.photo-icon::before {
  inset: 11px 9px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.photo-icon::after {
  left: 14px;
  bottom: 13px;
  width: 15px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(0 100%, 36% 34%, 58% 62%, 76% 40%, 100% 100%);
  opacity: 0.74;
}

.voice-icon::before {
  left: 17px;
  top: 9px;
  width: 10px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.voice-icon::after {
  left: 13px;
  top: 22px;
  width: 18px;
  height: 10px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 999px 999px;
}

.receipt-mini-icon::before {
  inset: 8px 12px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.receipt-mini-icon::after {
  left: 16px;
  top: 17px;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.memo-icon::before {
  inset: 9px 11px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.memo-icon::after {
  left: 16px;
  top: 18px;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

.incoming-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.documents-panel {
  margin-top: 0;
  padding: 6px;
}

.documents-panel .panel-head {
  display: block;
}

.documents-panel .section-label {
  margin-bottom: 0;
  font-size: 10px;
}

.documents-panel h2 {
  font-size: 15px;
}

.doc-note {
  display: none;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.document-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}

.document-item {
  align-content: start;
  grid-template-columns: 1fr;
  min-height: 32px;
  padding: 4px 6px;
}

.file-badge {
  width: fit-content;
  min-width: 44px;
  min-height: 18px;
  padding: 1px 7px;
  color: #17734f;
  background: var(--green-soft);
  text-transform: uppercase;
}

.document-item p {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  max-width: 420px;
  margin: 0;
  padding: 12px 16px;
  color: #ffffff;
  background: rgba(18, 32, 51, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(18, 32, 51, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.icon-button:active,
.user-chip:active,
.nav-item:active,
.site-card:active,
.summary-card:active {
  transform: scale(0.98);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(38, 136, 232, 0.28);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .desktop-stage {
    place-items: start center;
    overflow-x: auto;
  }

  .desktop-shell {
    min-width: 1080px;
  }
}

@media (min-width: 1181px) and (max-height: 820px) {
  .desktop-stage {
    place-items: start center;
  }

  .desktop-shell {
    transform: scale(0.9);
    transform-origin: top center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
