@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;600;700&display=swap");

:root {
  --ink: #17211b;
  --ink-soft: #314139;
  --muted: #778078;
  --line: #e5e8e4;
  --surface: #ffffff;
  --canvas: #f4f5f2;
  --amber: #e69b2c;
  --amber-dark: #bd7314;
  --amber-soft: #fff1d9;
  --green: #398b68;
  --green-soft: #e2f2e9;
  --blue: #3e78a4;
  --blue-soft: #e2edf5;
  --violet: #7666a4;
  --violet-soft: #ece8f5;
  --shadow: 0 18px 50px rgba(31, 43, 36, 0.09);
  --font: "DM Sans", "Noto Sans TC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

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

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 256px;
  flex-direction: column;
  padding: 28px 20px 20px;
  color: #f9fbf8;
  background:
    radial-gradient(circle at 10% 85%, rgba(230, 155, 44, 0.1), transparent 28%),
    #17211b;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #1d271f;
  background: var(--amber);
  box-shadow: inset 0 -3px 0 rgba(96, 55, 6, 0.15);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

.brand strong {
  display: block;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand small {
  display: block;
  margin-top: 1px;
  color: #8d9991;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 48px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 0;
  border-radius: 11px;
  color: #9ba69f;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  color: #202a23;
  background: var(--amber);
  font-weight: 700;
}

.sidebar-spacer {
  flex: 1;
}

.project-switcher {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eyebrow,
.section-kicker {
  color: #a3aaa4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.project-switcher-button {
  display: grid;
  width: 100%;
  grid-template-columns: 10px 1fr 18px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: white;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.project-color {
  width: 9px;
  height: 38px;
  border-radius: 10px;
  background: var(--amber);
}

.project-switcher-button strong,
.project-switcher-button small {
  display: block;
}

.project-switcher-button strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switcher-button small {
  margin-top: 4px;
  color: #8f9992;
  font-size: 10px;
}

.project-switcher-button svg {
  width: 17px;
  height: 17px;
  color: #758078;
}

.user-card {
  display: grid;
  grid-template-columns: 38px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease;
}

.user-card:hover,
.user-card:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.user-card strong,
.user-card small {
  display: block;
}

.user-card strong {
  font-size: 12px;
}

.user-card small {
  margin-top: 3px;
  color: #839087;
  font-size: 10px;
}

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: #697b70;
  font-size: 12px;
  font-weight: 700;
}

button.avatar {
  padding: 0;
  cursor: pointer;
}

.avatar-photo {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent),
    #a86836;
}

.icon-button {
  display: grid;
  padding: 6px;
  border: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.main-content {
  min-height: 100vh;
  margin-left: 256px;
}

.mobile-header {
  display: none;
}

.hero {
  padding: 32px 44px 0;
  color: white;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(20deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 42px 42px,
    #1e2b24;
}

.hero-main {
  max-width: 1360px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #89958d;
  font-size: 11px;
}

.breadcrumb b {
  color: #59655d;
}

.breadcrumb strong {
  color: #bcc5bf;
  font-weight: 500;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 29px 0 35px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(100, 204, 149, 0.25);
  border-radius: 999px;
  color: #8bd4ab;
  background: rgba(65, 156, 107, 0.14);
  font-size: 10px;
  font-weight: 700;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63c18e;
  box-shadow: 0 0 0 4px rgba(99, 193, 142, 0.12);
}

.project-code {
  color: #87938b;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.title-row h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.title-row p {
  margin: 10px 0 0;
  color: #98a49c;
  font-size: 13px;
}

.title-actions {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-light {
  color: var(--ink);
  border-color: var(--line);
  background: white;
}

.hero .button-light {
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.button-dark {
  color: #18221b;
  background: var(--amber);
  box-shadow: 0 6px 20px rgba(230, 155, 44, 0.15);
}

.archive-project-button {
  color: #d7ded9 !important;
}

.button-primary {
  color: #1e251f;
  background: var(--amber);
}

.button-primary:hover,
.button-dark:hover {
  background: #efa939;
  box-shadow: 0 8px 24px rgba(230, 155, 44, 0.24);
}

.hero-stats {
  display: grid;
  max-width: 1360px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 84px;
  padding: 15px 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stat:first-child {
  padding-left: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat-icon,
.export-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
}

.stat-icon svg,
.export-icon svg {
  width: 19px;
  height: 19px;
}

.amber {
  color: #cf8317;
  background: var(--amber-soft);
}

.green {
  color: var(--green);
  background: var(--green-soft);
}

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

.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.stat small,
.stat strong {
  display: block;
}

.stat small {
  margin-bottom: 4px;
  color: #7e8b83;
  font-size: 9px;
  font-weight: 600;
}

.stat strong {
  font-size: 12px;
  font-weight: 600;
}

.stat em {
  margin-left: 4px;
  color: #62bb8d;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
}

.workspace {
  max-width: 1450px;
  margin: 0 auto;
  padding: 34px 44px 90px;
}

.workspace-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  color: #a38b66;
  font-size: 9px;
}

.workspace-toolbar h2 {
  margin: 6px 0 0;
  font-size: 24px;
}

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

.search-box {
  display: flex;
  min-width: 250px;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #99a19c;
  background: white;
}

.search-box svg {
  width: 18px;
  height: 18px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.square-button {
  width: 42px;
  padding: 0;
}

.date-strip-wrap {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(68px, 1fr));
  gap: 7px;
  overflow: hidden;
}

.date-card {
  position: relative;
  display: flex;
  min-height: 67px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.date-card small {
  font-size: 9px;
}

.date-card strong {
  margin-top: 3px;
  font-size: 18px;
}

.date-card .record-dot {
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #adb5af;
}

.date-card.is-active {
  color: #1c251f;
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 8px 20px rgba(199, 127, 24, 0.14);
}

.date-card.is-active .record-dot {
  background: #49300d;
}

.date-card.is-today::after {
  position: absolute;
  top: 5px;
  right: 6px;
  content: "今";
  color: var(--amber-dark);
  font-size: 8px;
  font-weight: 700;
}

.date-card.is-active::after {
  color: #59390d;
}

.strip-arrow {
  display: grid;
  width: 30px;
  height: 40px;
  padding: 0;
  border: 0;
  place-items: center;
  color: #9da59f;
  background: transparent;
  cursor: pointer;
}

.strip-arrow svg {
  width: 18px;
}

.timeline {
  position: relative;
  margin-top: 31px;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 54px;
  width: 1px;
  content: "";
  background: #d9ded9;
}

.timeline-date-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px 44px;
}

.timeline-date-heading::before {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 6px solid var(--canvas);
  border-radius: 50%;
  content: "";
  background: var(--amber);
  box-shadow: 0 0 0 1px var(--amber);
}

.timeline-date-heading h3 {
  margin: 0;
  font-size: 14px;
}

.timeline-date-heading span {
  color: #8c958f;
  font-size: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 26px;
  margin-bottom: 22px;
}

.time-label {
  padding-top: 17px;
  color: #7d8780;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.record-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 330px) 1fr;
  overflow: hidden;
  border: 1px solid #e1e4e1;
  border-radius: 15px;
  background: white;
  box-shadow: 0 7px 24px rgba(31, 43, 36, 0.045);
}

.record-card::before {
  position: absolute;
  top: 22px;
  left: -19px;
  z-index: 2;
  width: 7px;
  height: 7px;
  border: 4px solid var(--canvas);
  border-radius: 50%;
  content: "";
  background: #909a93;
  box-shadow: 0 0 0 1px #a9b0ab;
}

.photo-frame {
  position: relative;
  min-height: 215px;
  overflow: hidden;
  background: #d9ded9;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.record-card:hover .photo-frame img {
  transform: scale(1.025);
}

.photo-frame .photo-date {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  color: white;
  background: rgba(16, 22, 18, 0.76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  backdrop-filter: blur(5px);
}

.record-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 26px 29px;
}

.record-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  color: #98631c;
  background: #fff3df;
  font-size: 9px;
  font-weight: 700;
}

.record-author {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #879089;
  font-size: 9px;
}

.record-author .avatar {
  width: 24px;
  height: 24px;
  border-width: 1px;
  font-size: 8px;
}

.record-content h4 {
  margin: 16px 0 9px;
  font-size: 18px;
  line-height: 1.4;
}

.record-content p {
  margin: 0;
  color: #707a73;
  font-size: 11px;
  line-height: 1.75;
}

.record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #edf0ed;
}

.record-location,
.record-comments {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a938d;
  font-size: 9px;
}

.record-location svg,
.record-comments svg {
  width: 14px;
  height: 14px;
}

.record-comments {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: #f4f6f4;
  cursor: pointer;
}

.empty-state {
  position: relative;
  margin-left: 68px;
  padding: 54px 24px;
  border: 1px dashed #d2d8d3;
  border-radius: 16px;
  color: #79837c;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

.empty-state svg {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  color: #a4aea6;
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: #455149;
  font-size: 14px;
}

.empty-state p {
  margin: 0 0 18px;
  font-size: 11px;
}

.floating-camera,
.bottom-nav {
  display: none;
}

.app-dialog {
  width: min(590px, calc(100% - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 90px rgba(12, 20, 15, 0.3);
}

.app-dialog::backdrop {
  background: rgba(13, 21, 16, 0.62);
  backdrop-filter: blur(4px);
}

.app-dialog form {
  padding: 27px;
}

.compact-dialog {
  width: min(560px, calc(100% - 32px));
}

#team-dialog {
  width: min(760px, calc(100% - 32px));
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dialog-header h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f3f1;
}

.photo-dropzone {
  position: relative;
  display: grid;
  min-height: 260px;
  margin-bottom: 19px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #c8cec9;
  border-radius: 14px;
  color: #6e7971;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    repeating-linear-gradient(45deg, #f4f6f4, #f4f6f4 10px, #f7f8f7 10px, #f7f8f7 20px);
  cursor: pointer;
}

.photo-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#photo-placeholder {
  display: grid;
  justify-items: center;
}

.camera-orbit {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  color: #81551a;
  background: var(--amber-soft);
}

.photo-dropzone strong,
.photo-dropzone small {
  display: block;
}

.photo-dropzone strong {
  color: #435047;
  font-size: 13px;
}

.photo-dropzone small {
  margin-top: 6px;
  font-size: 10px;
}

.photo-preview-grid {
  display: none;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  align-self: stretch;
  padding: 9px;
}

.photo-preview-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  background: #d9ded9;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item > button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(20, 28, 23, 0.78);
  cursor: pointer;
}

.photo-preview-item > button svg {
  width: 13px;
  height: 13px;
}

.date-watermark {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: block;
  padding: 4px 6px;
  border-radius: 3px;
  color: #111;
  background: rgba(255, 255, 255, 0.76);
  font-size: 7px;
  font-weight: 700;
}

.photo-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -10px 2px 18px;
  color: #737d76;
  font-size: 9px;
}

.photo-selection-summary button {
  padding: 4px 7px;
  border: 0;
  color: #8b5a18;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.photo-count-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #17211b;
  background: rgba(255, 255, 255, 0.85);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-dialog label:not(.photo-dropzone) {
  display: block;
  margin-bottom: 13px;
}

.app-dialog label > span {
  display: block;
  margin-bottom: 7px;
  color: #566159;
  font-size: 10px;
  font-weight: 700;
}

.app-dialog input,
.app-dialog select,
.app-dialog textarea {
  width: 100%;
  border: 1px solid #dce1dd;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fbfcfb;
  font-size: 12px;
}

.app-dialog input,
.app-dialog select {
  height: 42px;
  padding: 0 11px;
}

.app-dialog textarea {
  padding: 11px;
  resize: vertical;
}

.app-dialog input:focus,
.app-dialog select:focus,
.app-dialog textarea:focus {
  border-color: #d49a44;
  box-shadow: 0 0 0 3px rgba(230, 155, 44, 0.1);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 21px;
}

.member-list {
  display: grid;
  gap: 4px;
  max-height: 340px;
  overflow: auto;
}

.member-row {
  display: grid;
  grid-template-columns: 38px minmax(110px, 1fr) minmax(115px, 0.8fr) minmax(92px, 0.55fr);
  align-items: center;
  gap: 11px;
  padding: 10px 5px;
  border-bottom: 1px solid #edf0ed;
}

.member-row strong,
.member-row small {
  display: block;
}

.member-row strong {
  font-size: 12px;
}

.member-row small {
  margin-top: 2px;
  color: #8b948d;
  font-size: 9px;
}

.role-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: #68736b;
  background: #f0f3f0;
  font-size: 9px;
}

.member-permission-field {
  margin: 0 !important;
}

.member-permission-field > span {
  margin-bottom: 4px !important;
  color: #929a94 !important;
  font-size: 8px !important;
}

.member-permission-field select {
  height: 34px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

.invite-box {
  margin-top: 22px;
  padding: 16px;
  border-radius: 12px;
  background: #f5f6f4;
}

.invite-box > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
}

.invite-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 120px 95px auto;
  gap: 8px;
}

.project-dialog {
  width: min(720px, calc(100% - 32px));
}

.calendar-dialog {
  width: min(720px, calc(100% - 32px));
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  margin-bottom: 13px;
}

.calendar-toolbar strong {
  text-align: center;
  font-size: 15px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 5px;
  color: #8b948d;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: flex;
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid #e4e8e4;
  border-radius: 9px;
  color: #455149;
  text-align: left;
  background: white;
  cursor: pointer;
}

.calendar-day:hover {
  border-color: #d8a65c;
}

.calendar-day.is-outside {
  color: #abb2ad;
  background: #f7f8f7;
}

.calendar-day.is-selected {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}

.calendar-day.has-records::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--amber);
}

.calendar-day > span {
  font-size: 12px;
  font-weight: 700;
}

.calendar-day > small {
  color: #93631f;
  font-size: 7px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border-radius: 13px;
  color: white;
  background: #1d2a22;
}

.profile-summary .avatar {
  width: 46px;
  height: 46px;
}

.profile-summary strong,
.profile-summary small {
  display: block;
}

.profile-summary strong {
  font-size: 14px;
}

.profile-summary small {
  margin-top: 4px;
  color: #9eaaa2;
  font-size: 9px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 15px 0;
  border: 1px solid #e3e7e3;
  border-radius: 11px;
}

.profile-stats > span {
  padding: 12px;
  border-right: 1px solid #e3e7e3;
}

.profile-stats > span:last-child {
  border-right: 0;
}

.profile-stats small,
.profile-stats strong {
  display: block;
}

.profile-stats small {
  color: #89928b;
  font-size: 8px;
}

.profile-stats strong {
  margin-top: 4px;
  font-size: 12px;
}

.profile-project-list {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
}

.profile-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4f6f4;
}

.profile-project-row strong,
.profile-project-row small {
  display: block;
}

.profile-project-row strong {
  font-size: 10px;
}

.profile-project-row small {
  margin-top: 3px;
  color: #8a938d;
  font-size: 8px;
}

.profile-project-row b {
  color: #8a5c1b;
  font-size: 9px;
}

.profile-manage-button {
  width: 100%;
  margin-top: 15px;
}

.project-dialog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 12px;
  background: #f4f6f4;
}

.project-dialog-toolbar label {
  margin: 0 !important;
}

.project-dialog-toolbar select {
  min-width: 140px;
}

.archive-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.archive-toggle input {
  width: 17px !important;
  height: 17px !important;
  margin: 0;
  accent-color: var(--amber);
}

.archive-toggle span {
  margin: 0 !important;
  font-size: 10px !important;
}

.project-list {
  display: grid;
  gap: 20px;
  max-height: 470px;
  overflow: auto;
}

.new-project-panel {
  margin-bottom: 20px;
  border: 1px solid #e0e5e0;
  border-radius: 12px;
  background: #fbfcfb;
}

.new-project-panel summary {
  padding: 13px 15px;
  color: #83571b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.new-project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 15px 15px;
}

.new-project-grid label {
  margin: 0 !important;
}

.new-project-wide {
  grid-column: 1 / -1;
}

.project-team-builder {
  padding: 12px;
  border: 1px solid #dfe4df;
  border-radius: 11px;
  background: white;
}

.project-team-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-team-heading strong,
.project-team-heading small {
  display: block;
}

.project-team-heading strong {
  color: #48534b;
  font-size: 11px;
}

.project-team-heading small {
  margin-top: 3px;
  color: #8a938d;
  font-size: 8px;
}

.project-team-heading b {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #805519;
  background: var(--amber-soft);
  font-size: 9px;
}

.new-project-member-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.new-project-member-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 125px 90px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e7eae7;
  border-radius: 9px;
  opacity: 0.62;
  background: #fafbfa;
}

.new-project-member-row.is-selected {
  border-color: #deb77c;
  opacity: 1;
  background: #fffaf1;
}

.member-check {
  display: grid !important;
  grid-template-columns: 17px 32px 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  cursor: pointer;
}

.member-check input {
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  accent-color: var(--amber);
}

.member-check .avatar {
  width: 31px;
  height: 31px;
  font-size: 9px;
}

.member-check strong,
.member-check small {
  display: block;
}

.member-check strong {
  color: #39443c;
  font-size: 10px;
}

.member-check small {
  margin-top: 2px;
  color: #8a938d;
  font-size: 8px;
}

.new-project-member-row select {
  height: 34px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
}

.permission-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: #68736b;
  background: #f2f5f2;
  font-size: 9px;
  line-height: 1.6;
}

.project-year-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.project-year-heading strong {
  font-size: 13px;
}

.project-year-heading span {
  color: #8d968f;
  font-size: 9px;
}

.project-list-card {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  margin-bottom: 7px;
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  background: white;
}

.project-list-card.is-current {
  border-color: #d69b42;
  box-shadow: 0 0 0 2px rgba(230, 155, 44, 0.1);
}

.project-list-card.is-archived {
  opacity: 0.68;
  background: #f5f6f4;
}

.project-select-area {
  display: grid;
  min-width: 0;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.project-list-color {
  width: 7px;
  height: 43px;
  border-radius: 9px;
  background: var(--amber);
}

.project-list-copy {
  min-width: 0;
}

.project-list-copy strong,
.project-list-copy small {
  display: block;
}

.project-list-copy strong {
  font-size: 12px;
}

.project-list-copy small {
  overflow: hidden;
  margin-top: 5px;
  color: #89928b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-list-progress {
  padding: 5px 8px;
  border-radius: 999px;
  color: #7a5520;
  background: var(--amber-soft);
  font-size: 9px;
  font-weight: 700;
}

.project-archive-action {
  min-width: 60px;
  border: 0;
  border-left: 1px solid #e8ebe8;
  color: #737d76;
  background: #f7f8f7;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.project-archive-action:hover {
  color: #8e5b15;
  background: var(--amber-soft);
}

.project-list-empty {
  display: grid;
  gap: 6px;
  padding: 36px 20px;
  border: 1px dashed #d4dad5;
  border-radius: 13px;
  color: #8b948d;
  text-align: center;
}

.project-list-empty strong {
  color: #4e5952;
  font-size: 12px;
}

.project-list-empty span,
.dialog-footnote {
  font-size: 9px;
}

.dialog-footnote {
  margin: 18px 0 0;
  color: #8c958e;
  line-height: 1.6;
}

.invite-box small {
  display: block;
  margin-top: 8px;
  color: #8d968f;
  font-size: 9px;
}

.dialog-description {
  margin: -8px 0 18px;
  color: #78827b;
  font-size: 11px;
}

.export-options {
  display: grid;
  gap: 9px;
}

.export-option {
  display: grid;
  grid-template-columns: 43px 1fr 20px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  text-align: left;
  background: white;
  cursor: pointer;
  transition: 150ms ease;
}

.export-option:hover {
  border-color: #d3aa6c;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(43, 54, 47, 0.07);
}

.export-option strong,
.export-option small {
  display: block;
}

.export-option strong {
  font-size: 12px;
}

.export-option small {
  margin-top: 4px;
  color: #8a938c;
  font-size: 9px;
}

.export-option .chevron {
  width: 16px;
  color: #a3aaa5;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 330px;
  padding: 13px 17px;
  border-radius: 10px;
  color: white;
  background: #203027;
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

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

@media (max-width: 1120px) {
  .sidebar {
    width: 220px;
  }

  .main-content {
    margin-left: 220px;
  }

  .hero,
  .workspace {
    padding-right: 28px;
    padding-left: 28px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .record-card {
    grid-template-columns: minmax(200px, 275px) 1fr;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: white;
    background: rgba(24, 34, 28, 0.97);
    backdrop-filter: blur(12px);
  }

  .brand-mobile {
    gap: 8px;
  }

  .brand-mobile .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-mobile .brand-mark svg {
    width: 19px;
  }

  .brand-mobile strong {
    font-size: 16px;
  }

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

  .mobile-header .avatar {
    width: 32px;
    height: 32px;
  }

  .notification-button {
    position: relative;
    color: #d7ded9;
  }

  .notification-dot {
    position: absolute;
    top: 6px;
    right: 5px;
    width: 6px;
    height: 6px;
    border: 1px solid #1d2821;
    border-radius: 50%;
    background: var(--amber);
  }

  .hero {
    padding: 20px 18px 0;
  }

  .breadcrumb,
  .title-actions {
    display: none;
  }

  .title-row {
    padding: 6px 0 23px;
  }

  .status-line {
    margin-bottom: 10px;
  }

  .title-row h1 {
    font-size: 25px;
  }

  .title-row p {
    max-width: 90%;
    font-size: 11px;
    line-height: 1.6;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    min-height: 74px;
    padding: 12px 8px;
  }

  .stat:first-child {
    padding-left: 0;
  }

  .stat:nth-child(odd) {
    padding-left: 0;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
  }

  .stat small {
    font-size: 8px;
  }

  .stat strong {
    font-size: 10px;
  }

  .workspace {
    padding: 24px 15px 50px;
  }

  .workspace-toolbar {
    display: block;
  }

  .workspace-toolbar h2 {
    font-size: 21px;
  }

  .toolbar-actions {
    margin-top: 16px;
  }

  .search-box {
    min-width: 0;
    flex: 1;
  }

  .desktop-capture {
    display: none;
  }

  .date-strip-wrap {
    grid-template-columns: 1fr;
    margin: 20px -15px 0;
  }

  .date-strip {
    display: flex;
    padding: 2px 15px 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .date-strip::-webkit-scrollbar {
    display: none;
  }

  .date-card {
    min-width: 63px;
    min-height: 63px;
  }

  .strip-arrow {
    display: none;
  }

  .timeline {
    margin-top: 22px;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-date-heading {
    margin-left: -3px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-left: 21px;
  }

  .time-label {
    margin: 0 0 7px;
    padding-top: 0;
    text-align: left;
  }

  .record-card {
    display: block;
  }

  .record-card::before {
    top: 9px;
    left: -18px;
  }

  .photo-frame {
    min-height: 225px;
    aspect-ratio: 4 / 3;
  }

  .record-content {
    padding: 19px;
  }

  .record-content h4 {
    margin-top: 13px;
    font-size: 16px;
  }

  .empty-state {
    margin-left: 20px;
  }

  .floating-camera {
    position: fixed;
    right: 50%;
    bottom: calc(31px + env(safe-area-inset-bottom));
    z-index: 42;
    display: grid;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 5px solid var(--canvas);
    place-items: center;
    border-radius: 50%;
    color: #202a23;
    background: var(--amber);
    box-shadow: 0 8px 24px rgba(34, 42, 36, 0.23);
    cursor: pointer;
    transform: translateX(50%);
  }

  .floating-camera svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: grid;
    height: calc(67px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr 1fr 70px 1fr 1fr;
    padding: 5px 7px env(safe-area-inset-bottom);
    border-top: 1px solid #e1e5e1;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(23, 33, 27, 0.07);
    backdrop-filter: blur(12px);
  }

  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    color: #8a938d;
    background: transparent;
    font-size: 8px;
    font-weight: 600;
  }

  .bottom-nav button.is-active {
    color: var(--amber-dark);
  }

  .bottom-nav svg {
    width: 20px;
    height: 20px;
  }

  .toast {
    right: 15px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 15px;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .app-dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }

  .app-dialog form {
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .photo-dropzone {
    min-height: 220px;
  }

  .photo-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-day {
    min-height: 55px;
    padding: 6px;
  }

  .calendar-day > small {
    overflow: hidden;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-stats > span {
    border-right: 0;
    border-bottom: 1px solid #e3e7e3;
  }

  .profile-stats > span:last-child {
    border-bottom: 0;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .invite-row {
    grid-template-columns: 1fr 1fr;
  }

  .invite-row input {
    grid-column: 1 / -1;
  }

  .invite-row .button {
    grid-column: 1 / -1;
  }

  .member-row {
    grid-template-columns: 38px 1fr;
  }

  .member-permission-field {
    grid-column: auto;
  }

  .project-dialog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .new-project-grid {
    grid-template-columns: 1fr;
  }

  .new-project-wide {
    grid-column: auto;
  }

  .new-project-member-row {
    grid-template-columns: 1fr 1fr;
  }

  .member-check {
    grid-column: 1 / -1;
  }

  .project-select-area {
    grid-template-columns: 7px 1fr;
  }

  .project-list-progress {
    display: none;
  }

  .dialog-actions .button {
    flex: 1;
  }
}

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