:root {
  --paper: #f4efe5;
  --paper-deep: #e8dfd0;
  --card: #fffdf8;
  --card-soft: #f8f4eb;
  --ink: #1d2a24;
  --muted: #758078;
  --muted-dark: #58655e;
  --line: rgba(50, 72, 61, 0.13);
  --green: #2f6b55;
  --green-dark: #214c3d;
  --green-soft: #e3eee8;
  --orange: #d16f4c;
  --orange-soft: #f8e6de;
  --gold: #d6a342;
  --danger: #b64a43;
  --shadow: 0 18px 50px rgba(54, 62, 57, 0.09);
  --shadow-soft: 0 8px 24px rgba(54, 62, 57, 0.07);
  --radius-xl: 28px;
  --radius-lg: 21px;
  --radius-md: 15px;
  --sidebar: 248px;
  --font: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -10%, rgba(209, 111, 76, 0.10), transparent 31rem),
    radial-gradient(circle at 3% 35%, rgba(47, 107, 85, 0.09), transparent 28rem),
    var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.boot-mark,
.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px 18px 18px 6px;
  color: #fffdf8;
  background: var(--green);
  box-shadow: 6px 7px 0 rgba(47, 107, 85, 0.13);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
}

.boot-screen p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-layout {
  width: min(1080px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: 76px;
  padding: 54px 0;
}

.auth-story {
  position: relative;
  padding: 46px 38px;
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
}

.auth-story::before {
  inset: -14px 9% 8% -18px;
  background: rgba(255, 253, 248, 0.6);
  transform: rotate(-2.5deg);
}

.auth-story::after {
  width: 116px;
  height: 116px;
  right: 2%;
  bottom: -30px;
  background: var(--orange-soft);
  opacity: 0.88;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 23px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.auth-title {
  max-width: 570px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.3vw, 72px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.auth-title em {
  color: var(--orange);
  font-style: normal;
}

.auth-copy {
  max-width: 510px;
  margin: 24px 0 0;
  color: var(--muted-dark);
  font-size: 16px;
  line-height: 1.9;
}

.auth-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-notes span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-dark);
  background: rgba(255, 253, 248, 0.74);
  font-size: 12px;
}

.auth-card {
  position: relative;
  padding: 32px;
  border: 1px solid rgba(47, 107, 85, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.auth-card::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 6px;
  top: -3px;
  left: 50%;
  border-radius: 999px;
  background: var(--orange);
  opacity: 0.72;
  transform: translateX(-50%);
}

.auth-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
}

.auth-hint {
  margin: 9px 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
}

.field label {
  color: var(--muted-dark);
  font-size: 13px;
  font-weight: 650;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input,
.select {
  height: 48px;
  padding: 0 14px;
}

.textarea {
  min-height: 114px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.68;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(47, 107, 85, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 85, 0.09);
}

.input::placeholder,
.textarea::placeholder {
  color: #a5ada8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 720;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 9px 22px rgba(47, 107, 85, 0.19);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--card-soft);
}

.btn-ghost {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: var(--muted-dark);
  background: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.btn-danger {
  color: var(--danger);
  background: #fff4f2;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.form-error {
  display: none;
  margin: 13px 0 0;
  padding: 10px 12px;
  border-radius: 11px;
  color: #8e3430;
  background: #fff0ed;
  font-size: 13px;
  line-height: 1.55;
}

.form-error.show {
  display: block;
}

.setup-grid {
  display: grid;
  gap: 15px;
}

.account-block {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(248, 244, 235, 0.7);
}

.account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.account-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.account-block:nth-child(2) .account-number {
  background: var(--orange);
}

.account-head strong {
  font-size: 14px;
}

.account-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(247, 243, 234, 0.87);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px 14px 14px 5px;
  font-size: 20px;
  box-shadow: 5px 5px 0 rgba(47, 107, 85, 0.12);
}

.brand-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

.nav-label {
  margin: 0 12px 9px;
  color: #9a9f9b;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  color: var(--muted-dark);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 640;
  transition: color 150ms ease, background 150ms ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.nav-item:hover {
  color: var(--green);
  background: rgba(255, 255, 255, 0.65);
}

.nav-item.active {
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 760;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-quote {
  margin: 24px 9px;
  padding: 15px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
}

.sidebar-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.74);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 800;
}

.avatar.small {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  font-size: 12px;
}

.avatar.tiny {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 10px;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info strong {
  font-size: 13px;
}

.sidebar-user-info span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 42px clamp(24px, 4.5vw, 72px) 74px;
}

.main-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.mobile-header {
  display: none;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.page-header h1 em {
  color: var(--orange);
  font-style: normal;
}

.page-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.primary-action {
  min-width: 148px;
  height: 49px;
  border-radius: 15px;
}

.welcome-banner {
  position: relative;
  overflow: hidden;
  min-height: 182px;
  padding: 29px 31px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius-xl);
  color: #f9f7f0;
  background:
    linear-gradient(115deg, rgba(29, 75, 58, 0.98), rgba(52, 108, 84, 0.93)),
    var(--green);
  box-shadow: 0 20px 50px rgba(35, 78, 62, 0.18);
}

.welcome-banner::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -56px;
  top: -103px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.035), 0 0 0 68px rgba(255, 255, 255, 0.025);
}

.welcome-banner::after {
  content: "勤";
  position: absolute;
  right: 42px;
  top: 24px;
  color: rgba(255, 255, 255, 0.08);
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
}

.welcome-copy {
  position: relative;
  z-index: 1;
}

.welcome-copy span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.welcome-copy h2 {
  max-width: 600px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 650;
  line-height: 1.35;
}

.welcome-copy p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.today-stamp {
  position: relative;
  z-index: 1;
  min-width: 108px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  backdrop-filter: blur(10px);
}

.today-stamp strong {
  display: block;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
}

.today-stamp span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 38px;
}

.stat-card {
  min-height: 113px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.84);
  box-shadow: var(--shadow-soft);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
}

.stat-icon svg {
  width: 14px;
  height: 14px;
}

.stat-card:nth-child(2) .stat-icon {
  color: var(--orange);
  background: var(--orange-soft);
}

.stat-card:nth-child(3) .stat-icon {
  color: #987128;
  background: #f7edcf;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 13px;
}

.stat-value strong {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

.stat-value span {
  color: var(--muted);
  font-size: 11px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.72);
}

.filter-button {
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  transition: all 150ms ease;
}

.filter-button:hover {
  color: var(--green);
}

.filter-button.active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.search-wrap {
  position: relative;
  width: min(330px, 100%);
}

.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #9ba49e;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 43px;
  padding: 0 14px 0 39px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  font-size: 13px;
}

.search-input:focus {
  border-color: rgba(47, 107, 85, 0.45);
  box-shadow: 0 0 0 4px rgba(47, 107, 85, 0.07);
}

.result-count {
  color: var(--muted);
  font-size: 12px;
}

.feed {
  display: grid;
  gap: 17px;
}

.record-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: card-in 360ms ease both;
}

.record-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.record-card.mine::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
}

.record-card.partner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--orange);
}

.record-main {
  padding: 24px 25px 20px;
}

.record-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.record-author {
  min-width: 0;
  flex: 1;
}

.author-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.author-line strong {
  font-size: 14px;
}

.author-tag {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 760;
}

.author-tag.partner-tag {
  color: var(--orange);
  background: var(--orange-soft);
}

.record-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.record-menu {
  display: flex;
  gap: 3px;
}

.record-body {
  margin-top: 18px;
}

.record-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.record-title-line h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.35;
}

.duration-pill {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-dark);
  background: var(--card-soft);
  font-size: 11px;
  font-weight: 700;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.meta-chip {
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--muted-dark);
  background: #f0ede5;
  font-size: 10px;
  font-weight: 650;
}

.record-content,
.record-caption {
  margin: 16px 0 0;
  color: #47534d;
  font-size: 14px;
  line-height: 1.82;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.photo-grid.count-1 {
  grid-template-columns: minmax(0, 680px);
}

.primary-photos .photo-button,
.primary-photos .photo-button img {
  min-height: 230px;
}

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

.photo-button {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: var(--paper-deep);
  cursor: zoom-in;
}

.photo-button img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.photo-button:hover img {
  transform: scale(1.035);
}

.record-social {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
  gap: 0;
  border-top: 1px solid var(--line);
  background: rgba(248, 244, 235, 0.39);
}

.rating-box {
  padding: 18px 24px;
  border-right: 1px solid var(--line);
}

.social-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rating-value {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.stars {
  display: flex;
  align-items: center;
  gap: 3px;
}

.star-button {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  color: #cbc7bc;
  background: transparent;
  cursor: pointer;
  transition: color 120ms ease, transform 120ms ease;
}

.star-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.star-button.on {
  color: var(--gold);
}

.star-button:not(:disabled):hover {
  color: #bd8a26;
  transform: scale(1.1);
}

.star-button:disabled {
  cursor: default;
}

.rating-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.comments-box {
  padding: 17px 23px 20px;
}

.comment-list {
  display: grid;
  gap: 11px;
  margin-bottom: 12px;
}

.comment-empty {
  color: #99a09c;
  font-size: 11px;
}

.comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.comment-main {
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.comment-meta strong {
  font-size: 11px;
}

.comment-meta time {
  color: #a1a7a3;
  font-size: 9px;
}

.comment-text {
  margin: 0;
  color: #53605a;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.comment-delete {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #b4aaa6;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: all 140ms ease;
}

.comment:hover .comment-delete,
.comment-delete:focus-visible {
  opacity: 1;
}

.comment-delete:hover {
  color: var(--danger);
  background: #fff1ee;
}

.comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form .input {
  height: 39px;
  border-radius: 11px;
  font-size: 12px;
}

.comment-submit {
  width: 39px;
  min-width: 39px;
  min-height: 39px;
  padding: 0;
  border-radius: 11px;
}

.empty-state {
  padding: 68px 24px;
  border: 1px dashed rgba(47, 107, 85, 0.24);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.58);
  text-align: center;
}

.empty-illustration {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 28px 28px 28px 9px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-illustration::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -7px;
  bottom: -7px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  background: var(--orange);
}

.empty-illustration svg {
  width: 36px;
  height: 36px;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.empty-state p {
  max-width: 420px;
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(90vh, 860px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 32px 90px rgba(26, 38, 33, 0.26);
}

dialog::backdrop {
  background: rgba(21, 32, 27, 0.47);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 860px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 25px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.dialog-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: var(--card-soft);
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.dialog-body {
  overflow-y: auto;
  padding: 21px 25px 25px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 25px 21px;
  border-top: 1px solid var(--line);
  background: rgba(248, 244, 235, 0.45);
}

.image-picker {
  position: relative;
  min-height: 125px;
  padding: 22px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(47, 107, 85, 0.32);
  border-radius: 17px;
  color: var(--muted-dark);
  background: rgba(227, 238, 232, 0.32);
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.image-picker:hover,
.image-picker.dragging {
  border-color: var(--green);
  background: rgba(227, 238, 232, 0.62);
}

.image-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.image-picker svg {
  width: 29px;
  height: 29px;
  margin: 0 auto 8px;
  color: var(--green);
}

.image-picker strong {
  display: block;
  font-size: 13px;
}

.image-picker span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

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

.preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 0.78;
  border-radius: 14px;
  background: var(--paper-deep);
}

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

.upload-state {
  position: absolute;
  left: 7px;
  bottom: 7px;
  min-height: 27px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: rgba(25, 39, 32, 0.72);
  font-size: 10px;
  font-weight: 760;
  backdrop-filter: blur(6px);
}

.upload-state .spinner {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.upload-state.ready {
  width: 27px;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: rgba(47, 107, 85, 0.88);
  font-size: 13px;
}

.upload-state.error {
  cursor: pointer;
  background: rgba(182, 74, 67, 0.9);
}

.preview-item.has-error {
  outline: 2px solid rgba(182, 74, 67, 0.52);
  outline-offset: -2px;
}

.preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: rgba(26, 34, 30, 0.67);
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(18, 25, 22, 0.91);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 14px;
  color: #fff;
  background: #253a31;
  box-shadow: 0 14px 38px rgba(20, 34, 28, 0.25);
  font-size: 12px;
  line-height: 1.55;
  animation: toast-in 220ms ease both;
}

.toast.error {
  background: #9e403a;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1000px) {
  :root {
    --sidebar: 218px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 700px;
  }

  .auth-story {
    padding: 20px 20px 10px;
  }

  .auth-story::before,
  .auth-story::after {
    display: none;
  }

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

  .record-social {
    grid-template-columns: 1fr;
  }

  .rating-box {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .auth-layout {
    width: min(100% - 28px, 600px);
    padding: 26px 0 42px;
  }

  .auth-story {
    padding: 12px 4px;
  }

  .auth-title {
    font-size: clamp(36px, 11vw, 52px);
  }

  .auth-copy {
    font-size: 14px;
  }

  .auth-card {
    padding: 25px 20px;
    border-radius: 23px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 8px 12px env(safe-area-inset-bottom);
    display: block;
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(249, 246, 239, 0.94);
    box-shadow: 0 -8px 30px rgba(46, 58, 52, 0.08);
  }

  .brand,
  .sidebar-spacer,
  .sidebar-quote,
  .sidebar-user,
  .nav-label {
    display: none;
  }

  .nav {
    height: 58px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .nav-item {
    height: 56px;
    padding: 5px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    text-align: center;
    font-size: 10px;
  }

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

  .main {
    margin-left: 0;
    padding: 16px 14px 96px;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
  }

  .mobile-header .brand {
    padding: 0;
  }

  .mobile-header .brand-mark {
    width: 37px;
    height: 37px;
    font-size: 18px;
  }

  .mobile-header .brand-copy strong {
    font-size: 15px;
  }

  .mobile-header .brand-copy span {
    display: none;
  }

  .page-header {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .page-header h1 {
    font-size: 31px;
  }

  .page-header p {
    font-size: 12px;
  }

  .primary-action {
    width: 47px;
    min-width: 47px;
    height: 47px;
    padding: 0;
    border-radius: 15px;
  }

  .primary-action span {
    display: none;
  }

  .welcome-banner {
    min-height: 162px;
    padding: 23px 21px;
  }

  .welcome-banner::after {
    right: 18px;
    font-size: 74px;
  }

  .today-stamp {
    display: none;
  }

  .stats-grid {
    gap: 9px;
    margin-bottom: 29px;
  }

  .stat-card {
    min-height: 100px;
    padding: 15px;
  }

  .stat-value strong {
    font-size: 26px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .filter-button {
    flex: 1;
    padding: 0 6px;
  }

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

  .search-wrap {
    width: 100%;
  }

  .result-count {
    align-self: flex-end;
  }

  .record-main {
    padding: 20px 18px 17px;
  }

  .record-title-line h3 {
    font-size: 20px;
  }

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

  .photo-grid.count-1 {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-button,
  .photo-button img {
    min-height: 120px;
  }

  .rating-box {
    padding: 16px 18px;
  }

  .comments-box {
    padding: 15px 18px 18px;
  }

  .comment-delete {
    opacity: 1;
  }

  .dialog-head,
  .dialog-body,
  .dialog-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .toast-region {
    right: 16px;
    bottom: 82px;
    left: 16px;
  }

  .toast {
    width: 100%;
    min-width: 0;
  }
}

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