:root {
  --yellow: #feeb27;
  --orange: #fe8e00;
  --deep-orange: #fe3d00;
  --black: #020202;
  --white: #ffffff;
  --panel-bg: rgba(12, 12, 12, 0.82);
  --gold-metal: linear-gradient(145deg, #ffe57a 0%, #feeb27 20%, #fe8e00 45%, #ffe57a 62%, #b46f00 85%, #ffdf59 100%);
  --pattern-fill: radial-gradient(circle at 20% 25%, rgba(254, 235, 39, 0.16) 0 8%, transparent 9%),
    radial-gradient(circle at 80% 75%, rgba(254, 61, 0, 0.14) 0 7%, transparent 8%),
    repeating-linear-gradient(135deg, rgba(254, 142, 0, 0.08) 0 4px, rgba(0, 0, 0, 0) 4px 11px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #f7f5f0;
  color: #1a1a1a;
  font-family: "Noto Sans SC", sans-serif;
}

body {
  background-image: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: #ffffff;
  background-image: none;
  border-bottom: 1px solid #d9e6d3;
  backdrop-filter: blur(6px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 102px;
  height: 120px;
  object-fit: contain;
}

.brand-title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: none;
  color: #22B14C;
  text-shadow: none;
}

.brand-subtitle {
  margin: 0.12rem 0 0;
  color: #22B14C;
  font-size: 0.9rem;
}

.main-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: #2D4F1E;
  font-weight: 700;
  padding: 0.45rem 0.78rem;
  border: 1px solid #22B14C;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active-link {
  transform: translateY(-1px);
  background: #22B14C;
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn,
.accent-btn {
  border: 1px solid #22B14C;
  color: var(--white);
  background: #22B14C;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.action-btn:hover,
.accent-btn:hover {
  transform: translateY(-1px);
  background: #1c8f3d;
  filter: none;
}

main {
  width: min(1120px, 96vw);
  margin: 1rem auto 2rem;
}

.view {
  display: none;
  animation: reveal 0.35s ease;
}

.view.active {
  display: block;
}

.hero,
.panel,
.contact-layout,
.about-layout {
  background: #ffffff;
  background-image: none;
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
}

.about-layout,
.contact-layout {
  background: #d3d3d3;
  background-image: none;
}

.about-layout p,
.contact-layout p,
.contact-layout span,
.contact-layout strong {
  color: #1a1a1a;
}

.bevel-border {
  border: 2px solid #22B14C;
  box-shadow: inset 1px 1px 0 rgba(255, 251, 210, 0.25), inset -1px -1px 0 rgba(112, 60, 0, 0.15), 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
  margin-top: 0;
  color: var(--deep-orange);
  font-family: "Cinzel", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  color: #22B14C;
}

.sub-title {
  color: #22B14C;
  margin-bottom: 0.65rem;
}

.hero-copy,
p,
.notice,
label {
  color: #1a1a1a;
}

.notice {
  background: rgba(254, 142, 0, 0.09);
  border-left: 3px solid var(--orange);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
}

.card-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.95rem;
  margin-top: 0.8rem;
}

.featured-pager {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
}

.pager-info {
  min-width: 64px;
  text-align: center;
  font-weight: 700;
  color: var(--deep-orange);
}

.card,
.gallery-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid #ede8df;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover,
.gallery-item:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card img,
.gallery-item img {
  width: 100%;
  display: block;
  height: 190px;
  object-fit: cover;
}

.gallery-open-trigger {
  cursor: zoom-in;
}

.gallery-delete-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  color: #ffffff;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
}

.gallery-delete-btn:hover {
  background: #c92c2c;
}

.gallery-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #000;
}

.gallery-track {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gallery-slide {
  min-width: 100%;
  position: relative;
}

.gallery-slide img {
  height: 220px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.carousel-prev {
  left: 0.4rem;
}

.carousel-next {
  right: 0.4rem;
}

.gallery-dots {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-dot.active {
  background: #feeb27;
  transform: scale(1.2);
}

.card-content,
.gallery-caption {
  padding: 0.68rem;
  display: flex;
  flex-direction: column;
}

.gallery-caption-text {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 0.45rem;
  flex: 1;
}

.gallery-manage-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.gallery-manage-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.gallery-manage-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.gallery-manage-info {
  flex: 1;
  min-width: 0;
}

.gallery-manage-captions {
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
  line-height: 1.6;
  word-break: break-word;
}

.gallery-manage-label {
  opacity: 0.6;
  font-size: 0.78rem;
}

.gallery-manage-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-manage-edit-form {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-manage-edit-form label {
  font-size: 0.82rem;
  opacity: 0.7;
}

.gallery-manage-edit-form input,
.gallery-manage-edit-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.gallery-manage-edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.article-price {
  margin: 0.25rem 0 0.45rem;
  color: var(--deep-orange);
  font-weight: 700;
}

.card-actions {
  margin-top: 0.55rem;
}

.card-actions .action-btn {
  text-decoration: none;
  display: inline-block;
}

.about-layout,
.contact-layout,
.forms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info p,
.contact-info span,
.contact-info strong {
  font-size: clamp(0.85rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  color: #1a1a1a;
  font-family: "Noto Sans SC", sans-serif;
}

.contact-info p {
  margin: 0;
}

.owner-photo,
.qr-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #22B14C;
}

.qr-image {
  width: min(220px, 75%);
  margin-top: 0.7rem;
  justify-self: start;
}

.auth-form,
.panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.upload-status {
  min-height: 1.15rem;
  color: var(--deep-orange);
  font-size: 0.86rem;
}

.error-text {
  color: #c0392b;
}

.auth-secondary {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--deep-orange);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.link-btn:hover {
  color: var(--orange);
}

.admin-edit-grid {
  margin-top: 1rem;
}

.update-meta {
  margin-top: 0.35rem;
  color: var(--orange);
  font-size: 0.85rem;
  opacity: 0.95;
}

#articleDetailBody {
  white-space: pre-wrap;
  word-break: break-word;
}

.article-admin-meta {
  font-size: 0.82rem;
  color: #444;
  margin-top: 0.75rem;
}

.article-edit-panel {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(254, 142, 0, 0.3);
  padding-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.article-edit-panel input,
.article-edit-panel textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(254, 142, 0, 0.4);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  resize: vertical;
}

.edit-btn-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.article-detail-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.detail-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e0d0c0;
  margin-bottom: 0.8rem;
}

.share-wrap {
  margin-top: 1rem;
}

.share-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  text-decoration: none;
  border: 1px solid rgba(254, 142, 0, 0.45);
  background: rgba(254, 142, 0, 0.1);
  color: #1a1a1a;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.x-icon {
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
}

input,
textarea,
select {
  background: #ffffff;
  border: 1px solid #d0c8b8;
  color: #1a1a1a;
  padding: 0.55rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

input::placeholder,
textarea::placeholder {
  color: #a09888;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e0d8c8;
  padding: 0.6rem;
  color: #1a1a1a;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 1rem;
}

.modal-card {
  width: min(540px, 100%);
  background: rgba(10, 10, 10, 0.96);
  border-radius: 18px;
  padding: 1rem;
  position: relative;
}

.gallery-modal-card {
  width: min(920px, 95vw);
}

.gallery-modal-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #080808;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-modal-image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

#galleryModalPrev {
  left: 0.7rem;
}

#galleryModalNext {
  right: 0.7rem;
}

.gallery-modal-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.modal-card p,
.modal-card label,
.modal-card .sub-title,
.modal-card .notice {
  color: #ffffff;
}

.modal-card .notice {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--orange);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.tab {
  flex: 1;
  border: 1px solid rgba(254, 235, 39, 0.45);
  background: rgba(254, 142, 0, 0.15);
  color: var(--white);
  border-radius: 8px;
  padding: 0.45rem;
  cursor: pointer;
}

.tab.active {
  background: #22B14C;
}

.close-btn {
  position: absolute;
  right: 0.7rem;
  top: 0.5rem;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 2rem;
  background: #ffffff;
  background-image: none;
  color: #1a1a1a;
  border-top: 1px solid #d9e6d3;
}

.site-footer p {
  margin: 0;
  color: #1a1a1a;
  font-weight: 600;
}

.hidden,
.auth-only,
.approved-only {
  display: none !important;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .about-layout,
  .contact-layout,
  .forms-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }

  .brand-logo {
    width: 75px;
    height: 89px;
  }

  .contact-info p,
  .contact-info span,
  .contact-info strong {
    font-size: clamp(0.6rem, 6.5vw, 1.5rem);
  }
}
