:root {
  --bg: #f4f7fb;
  --surface: #fff;
  --text: #17202a;
  --muted: #657383;
  --line: #dce5ee;
  --primary: #176f63;
  --primary-dark: #0f5149;
  --accent: #c9952f;
  --shadow: 0 16px 40px rgba(23, 32, 42, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #176f63, #17324a);
}

.login-card {
  width: min(100%, 420px);
  padding: 30px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.login-card h1,
.content-card h3,
.digital-card h2,
.section-title {
  margin: 0;
  letter-spacing: 0;
}

.login-card p,
.content-card p {
  color: var(--muted);
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.app-screen {
  min-height: 100vh;
  padding-bottom: 76px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.app-header strong,
.app-header span {
  display: block;
}

.app-header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-header button,
.modal-card header button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.app-content {
  width: min(780px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0;
}

.status-card,
.content-card,
.digital-card,
.voucher-card,
.modal-card,
.option-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-card,
.content-card,
.digital-card,
.voucher-card {
  padding: 18px;
  margin-bottom: 14px;
}

.status-card span {
  color: var(--muted);
}

.status-card h2 {
  margin: 5px 0 12px;
  font-size: 1.35rem;
}

.status-card mark {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dff4ef;
  color: var(--primary-dark);
  font-weight: 800;
  text-transform: capitalize;
}

.content-card h4 {
  margin: 14px 0 6px;
}

.news-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.news-card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.06);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-card:hover,
.news-card:focus {
  outline: none;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.news-card img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.news-type {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dff4ef;
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.news-card h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.news-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.news-card time {
  display: block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.news-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(23, 32, 42, 0.58);
}

.news-detail-card {
  position: relative;
  width: min(100%, 760px);
  max-height: min(88vh, 820px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.news-detail-close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin: 10px 10px 0 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 42, 0.82);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

#news-detail-image {
  width: 100%;
  max-height: 360px;
  display: block;
  object-fit: cover;
  background: #eef3f8;
}

.news-detail-body {
  padding: 22px;
}

.news-detail-body h2 {
  margin: 6px 0 10px;
  font-size: 1.45rem;
  line-height: 1.18;
}

.news-detail-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
}

.news-detail-content p {
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.58;
}

.news-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.news-detail-meta dt {
  margin: 0;
}

.news-detail-meta dd {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  color: var(--primary-dark);
}

@media (max-width: 560px) {
  .news-detail-overlay {
    align-items: end;
    padding: 0;
  }

  .news-detail-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  #news-detail-image {
    max-height: 260px;
  }

  .news-detail-meta {
    grid-template-columns: 1fr;
  }
}

.digital-card h2 {
  text-align: center;
  margin-bottom: 16px;
}

dl {
  margin: 0;
}

dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

dd {
  margin: 4px 0 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3f8;
  font-weight: 800;
}

.qr-wrap {
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 16px;
  border-radius: 10px;
  background: #f8fafc;
}

.qr-wrap img {
  width: 160px;
  height: 160px;
}

.section-title {
  margin: 20px 0 12px;
  font-size: 1.2rem;
}

.voucher-card strong {
  display: block;
  color: var(--primary);
}

.voucher-card h3 {
  margin: 6px 0;
}

.voucher-card p {
  margin: 4px 0;
  color: var(--muted);
}

.empty-state {
  padding: 18px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tab-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: #405061;
  font-weight: 800;
}

.tab-button.active {
  background: var(--primary);
  color: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(23, 32, 42, 0.42);
}

.message-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 42, 0.54);
}

.message-card {
  width: min(100%, 390px);
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.message-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #dff4ef;
  color: var(--primary-dark);
  font-size: 30px;
  font-weight: 900;
}

.message-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.message-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.modal-card {
  width: min(100%, 720px);
  max-height: 86vh;
  overflow: auto;
  padding: 18px;
}

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

.modal-card h2 {
  margin: 0;
}

.option-card {
  width: 100%;
  display: block;
  padding: 14px;
  margin-bottom: 10px;
  border-color: var(--line);
  text-align: left;
}

.option-card.active {
  border-color: var(--primary);
  background: #edf8f5;
}

.option-card strong {
  display: block;
  margin-bottom: 4px;
}

.service-button {
  width: 100%;
  min-height: 46px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.ios-install-hint {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 84px;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  box-shadow: var(--shadow);
}

.ios-install-hint button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
