/* Yahoo 360° Retro Web 2.0 Design System */
:root {
  --y360-bg: #ffffff;
  --y360-surface: #ffffff;
  --y360-surface-alt: #eef4fb;
  --y360-border: #cccccc;
  --y360-module-head: #ffffff;
  --y360-module-head-text: #666666;
  --y360-accent: #1c5f9e;
  --y360-accent-hover: #134874;
  --y360-link: #0000bb;
  --y360-text: #555555;
  --y360-muted: #666666;
  --y360-blast-bg: #f4f9ff;
  --y360-blast-border: #6b9bd1;
  --y360-badge-bg: #e8f1fc;
  --y360-badge-text: #1b4f80;
}

.theme-hong {
  --y360-bg: #fdf2f8;
  --y360-surface: #ffffff;
  --y360-surface-alt: #fff7fb;
  --y360-border: #f3c4dc;
  --y360-header-bg: linear-gradient(90deg, #9d174d 0%, #db2777 65%, #f472b6 100%);
  --y360-module-head: linear-gradient(180deg, #ec4899 0%, #be185d 100%);
  --y360-accent: #be185d;
  --y360-accent-hover: #9d174d;
  --y360-link: #be185d;
  --y360-blast-bg: #fff1f5;
  --y360-blast-border: #f9a8d4;
  --y360-badge-bg: #fce7f3;
  --y360-badge-text: #9d174d;
}

.theme-xanh-la {
  --y360-bg: #eef7f0;
  --y360-surface: #ffffff;
  --y360-surface-alt: #f5fbf6;
  --y360-border: #b8dcc0;
  --y360-header-bg: linear-gradient(90deg, #14532d 0%, #15803d 60%, #22c55e 100%);
  --y360-module-head: linear-gradient(180deg, #2e9a54 0%, #1d733b 100%);
  --y360-accent: #15803d;
  --y360-accent-hover: #166534;
  --y360-link: #15803d;
  --y360-blast-bg: #f0fdf4;
  --y360-blast-border: #86efac;
  --y360-badge-bg: #dcfce7;
  --y360-badge-text: #166534;
}

.theme-dem {
  --y360-bg: #0f172a;
  --y360-surface: #1e293b;
  --y360-surface-alt: #172033;
  --y360-border: #334155;
  --y360-header-bg: linear-gradient(90deg, #090d1a 0%, #312e81 55%, #1e1b4b 100%);
  --y360-module-head: linear-gradient(180deg, #4338ca 0%, #312e81 100%);
  --y360-accent: #818cf8;
  --y360-accent-hover: #6366f1;
  --y360-link: #93c5fd;
  --y360-text: #e2e8f0;
  --y360-muted: #94a3b8;
  --y360-blast-bg: #292544;
  --y360-blast-border: #4f46e5;
  --y360-badge-bg: #312e81;
  --y360-badge-text: #c7d2fe;
}

.theme-hoang-hon {
  --y360-bg: #fff3eb;
  --y360-surface: #ffffff;
  --y360-surface-alt: #fff9f5;
  --y360-border: #f3c6a5;
  --y360-header-bg: linear-gradient(90deg, #7c2d12 0%, #ea580c 55%, #db2777 100%);
  --y360-module-head: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  --y360-accent: #c2410c;
  --y360-accent-hover: #9a3412;
  --y360-link: #c2410c;
  --y360-blast-bg: #fff7ed;
  --y360-blast-border: #fdba74;
  --y360-badge-bg: #ffedd5;
  --y360-badge-text: #9a3412;
}

.theme-bien {
  --y360-bg: #ecfeff;
  --y360-surface: #ffffff;
  --y360-surface-alt: #f3fdff;
  --y360-border: #a5e3ec;
  --y360-header-bg: linear-gradient(90deg, #0c4a6e 0%, #0284c7 55%, #06b6d4 100%);
  --y360-module-head: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%);
  --y360-accent: #0369a1;
  --y360-accent-hover: #075985;
  --y360-link: #0284c7;
  --y360-blast-bg: #f0f9ff;
  --y360-blast-border: #7dd3fc;
  --y360-badge-bg: #e0f2fe;
  --y360-badge-text: #075985;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--y360-text);
  background: var(--y360-bg);
}

.y360-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--y360-bg);
  color: var(--y360-text);
}

a {
  color: var(--y360-link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.y360-container {
  width: 100%;
  max-width: 952px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Thanh đầu trang kiểu Yahoo! 360° Plus */
.y360-topbar {
  background: radial-gradient(circle at 12% -40%, #5a2a66 0, transparent 38%),
    radial-gradient(circle at 78% 140%, #3c3c44 0, transparent 34%), #1b1b1d;
  color: #cfcfcf;
  font: 12px/1.4 Arial, Helvetica, sans-serif;
}
.y360-topbar a { color: #8fd0ef; }
.y360-topbar-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; }
.y360-brand { display: inline-flex; align-items: flex-end; gap: 2px; text-decoration: none !important; }
.y360-topbar .y360-brand { color: #fff; }
.y360-brand-yahoo { font: 900 25px/1 Georgia, "Times New Roman", serif; letter-spacing: -1px; text-transform: uppercase; }
.y360-brand-360 { font: 700 18px/1.05 Arial, sans-serif; margin-left: 5px; }
.y360-brand-360 small { display: block; font-size: 11px; letter-spacing: 2px; color: #bbb; }
.y360-greeting { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.y360-greeting form { display: inline; }
.y360-greeting button { background: none; border: 0; padding: 0; color: #8fd0ef; font: inherit; cursor: pointer; }
.y360-toplinks { margin-left: auto; }
.y360-menubar { background: linear-gradient(#5d5d61 0, #38383b 48%, #1f1f21 52%, #2c2c2f 100%); border-block: 1px solid #000; }
.y360-menubar .y360-container { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.y360-nav { display: flex; flex-wrap: wrap; }
.y360-topbar .y360-nav a { color: #fff; font-weight: 700; font-size: 12px; padding: 8px 12px; border-right: 1px solid #1a1a1a; box-shadow: inset -1px 0 #55555a; }
/* Rê chuột: nút nổi lên (sáng hơn nền menu, vạch vàng dưới chân), không tối đi. */
.y360-topbar .y360-nav a:hover, .y360-topbar .y360-nav a:focus-visible { background: linear-gradient(#85858c 0, #5c5c63 48%, #46464c 52%, #55555c 100%); color: #ffd36a; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); box-shadow: inset 0 1px rgba(255, 255, 255, .35), inset 0 -3px #ffb52e; text-decoration: none; }
/* Trang đang xem: nút cam đặc, đứng sau luật hover để rê chuột không làm mất. */
.y360-topbar .y360-nav a[aria-current="page"] { background: linear-gradient(#ffd273 0, #ffb52e 48%, #f59a0b 52%, #ffab1f 100%); color: #2a1800; text-shadow: 0 1px rgba(255, 255, 255, .4); box-shadow: inset 0 1px rgba(255, 255, 255, .55); }
.y360-search { display: flex; gap: 6px; padding: 4px 0; }
.y360-search input { width: 180px; max-width: 50vw; border: 1px solid #000; padding: 3px 6px; font: inherit; }
.y360-search button { background: linear-gradient(#ffc355, #f08a00); border: 1px solid #a85d00; border-radius: 3px; color: #3a2000; font: 700 12px Arial, sans-serif; padding: 3px 14px; cursor: pointer; }

.y360-main {
  flex: 1;
  padding: 18px 0 36px;
}

.y360-footer {
  border-top: 1px solid var(--y360-border);
  background: var(--y360-surface);
  color: var(--y360-muted);
  padding: 14px 0;
  font-size: 12px;
}
.y360-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.y360-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* Blog & 360° Custom Layouts */
.y360-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}

.y360-layout-left-sidebar {
  grid-template-columns: 290px minmax(0, 1fr);
}
.y360-layout-left-sidebar .y360-col-primary { grid-column: 1; }
.y360-layout-left-sidebar .y360-col-secondary { grid-column: 1; }
.y360-layout-left-sidebar .y360-col-main { grid-column: 2; grid-row: 1 / span 2; }

.y360-layout-right-sidebar {
  grid-template-columns: minmax(0, 1fr) 290px;
}
.y360-layout-right-sidebar .y360-col-main { grid-column: 1; grid-row: 1 / span 2; }
.y360-layout-right-sidebar .y360-col-primary { grid-column: 2; }
.y360-layout-right-sidebar .y360-col-secondary { grid-column: 2; }

.y360-layout-three-column {
  grid-template-columns: 250px minmax(0, 1fr) 250px;
}
.y360-layout-three-column .y360-col-primary { grid-column: 1; }
.y360-layout-three-column .y360-col-main { grid-column: 2; }
.y360-layout-three-column .y360-col-secondary { grid-column: 3; }

@media (max-width: 900px) {
  .y360-grid,
  .y360-layout,
  .y360-layout-left-sidebar,
  .y360-layout-right-sidebar,
  .y360-layout-three-column {
    grid-template-columns: 1fr;
  }
  .y360-layout .y360-col-primary,
  .y360-layout .y360-col-main,
  .y360-layout .y360-col-secondary {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Custom Blog Canvas: Fonts & Patterns */
.y360-blog-canvas {
  border-radius: 8px;
  padding: 12px;
}

.y360-font-tahoma { font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif; }
.y360-font-georgia { font-family: Georgia, "Times New Roman", serif; }
.y360-font-courier { font-family: "Courier New", Courier, monospace; }
.y360-font-system { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

.y360-pattern-none { background-color: transparent; }
.y360-pattern-dots {
  background-image: radial-gradient(var(--y360-border) 1.25px, transparent 1.25px);
  background-size: 14px 14px;
}
.y360-pattern-grid {
  background-image:
    linear-gradient(to right, rgba(100, 116, 139, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(100, 116, 139, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
}
.y360-pattern-stars {
  background-image:
    radial-gradient(var(--y360-accent) 1px, transparent 1px),
    radial-gradient(var(--y360-border) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}
.y360-pattern-paper {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 23px,
    rgba(100, 116, 139, 0.12) 24px
  );
}

.y360-blog-banner {
  background: var(--y360-surface);
  border: 1px solid var(--y360-border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.y360-blog-banner-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.y360-blog-banner-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--y360-accent);
}
.y360-blog-banner-desc {
  margin: 4px 0 0;
  color: var(--y360-muted);
}

.y360-settings-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.y360-tab-link {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--y360-border);
  background: var(--y360-surface);
  color: var(--y360-text);
  font-weight: 700;
  font-size: 12px;
}
.y360-tab-link.is-active {
  background: var(--y360-accent);
  color: #ffffff;
  border-color: var(--y360-accent);
}

.y360-settings-section {
  border-bottom: 1px dashed var(--y360-border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.y360-settings-section:last-of-type {
  border-bottom: none;
}
.y360-settings-section h3 {
  margin: 0 0 10px;
  color: var(--y360-accent);
  font-size: 15px;
}

.y360-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .y360-form-grid-2 { grid-template-columns: 1fr; }
}

.y360-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--y360-border);
  border-radius: 4px;
  background: var(--y360-surface-alt);
  cursor: pointer;
}

.y360-signature {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--y360-border);
  color: var(--y360-muted);
  font-style: italic;
  white-space: pre-line;
}

.y360-music-box .y360-box-body {
  background: var(--y360-blast-bg);
}

.y360-box {
  background: var(--y360-surface);
  border: 1px solid var(--y360-border);
  border-radius: 6px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.y360-box-head {
  background: var(--y360-module-head);
  color: var(--y360-module-head-text);
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.y360-box-body {
  padding: 12px;
}

.y360-blast-banner {
  background: var(--y360-blast-bg);
  border: 1px solid var(--y360-blast-border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.y360-blast-icon { font-size: 20px; flex-shrink: 0; }

.y360-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--y360-accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.y360-btn:hover { background: var(--y360-accent-hover); text-decoration: none; }
.y360-btn-secondary {
  background: var(--y360-surface-alt);
  color: var(--y360-text);
  border-color: var(--y360-border);
}
.y360-btn-danger {
  background: #dc2626;
  color: #fff;
}

.y360-input,
.y360-select,
.y360-textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--y360-border);
  border-radius: 4px;
  background: var(--y360-surface);
  color: var(--y360-text);
  font: inherit;
}

.y360-field { margin-bottom: 12px; }
.y360-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 12px;
}

.y360-alert {
  padding: 9px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}
.y360-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.y360-alert-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.y360-badge {
  display: inline-block;
  background: var(--y360-badge-bg);
  color: var(--y360-badge-text);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.y360-avatar {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--y360-border);
  background: var(--y360-surface-alt);
}
.y360-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--y360-border);
}

.y360-friends-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.y360-friend-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 12px;
  gap: 4px;
}

.y360-post-card {
  border-bottom: 1px dashed var(--y360-border);
  padding: 12px 0;
}
.y360-post-card:last-child { border-bottom: none; padding-bottom: 0; }
.y360-post-meta {
  font-size: 12px;
  color: var(--y360-muted);
  margin: 4px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.y360-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.y360-prose blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--y360-accent);
  background: var(--y360-surface-alt);
}

.y360-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--y360-surface-alt);
  border: 1px solid var(--y360-border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.y360-editor-toolbar button {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--y360-border);
  background: var(--y360-surface);
  color: var(--y360-text);
  border-radius: 3px;
  cursor: pointer;
}
.y360-editor-area {
  min-height: 220px;
  padding: 10px 12px;
  border: 1px solid var(--y360-border);
  border-radius: 0 0 4px 4px;
  background: var(--y360-surface);
  color: var(--y360-text);
  outline: none;
}

.y360-profile-cover {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--y360-border);
}

/* =====================================================================
   Yahoo! 360° Plus Portal Architecture: Canvas, Design Tokens, 5 Presets
   ===================================================================== */
.platform-protected-island {
  position: relative;
  z-index: 60;
}

#blog-canvas.y360-blog-canvas {
  background-color: var(--blog-bg-color, transparent);
  background-image: var(--blog-bg-image, none);
  background-attachment: var(--blog-bg-attachment, scroll);
  background-size: cover;
  background-position: center top;
  color: var(--blog-text-color, var(--y360-text));
  font-family: var(--blog-font-family, inherit);
  cursor: var(--blog-cursor, auto);
  padding: 12px;
  border-radius: 8px;
}

#blog-canvas .ycntmod {
  background: var(--module-surface-bg, var(--y360-surface));
  border-color: var(--blog-border-color, var(--y360-border));
  backdrop-filter: blur(var(--module-backdrop-blur, 0px));
  -webkit-backdrop-filter: blur(var(--module-backdrop-blur, 0px));
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

#blog-canvas .ycntmod .rctop {
  background: var(--module-title_color, var(--module-title-color, var(--y360-module-head)));
  color: var(--module-title-text-color, var(--y360-module-head-text));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#blog-canvas a {
  color: var(--blog-link-color, var(--y360-link));
}
#blog-canvas .y360-btn {
  color: #ffffff;
}
#blog-canvas .y360-btn.y360-btn-secondary {
  color: var(--y360-text);
}

.y360-profile-cover-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
  display: block;
}

.y360-blog-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--blog-border-color, var(--y360-border));
}
.y360-blog-subnav a {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--blog-text-color, var(--y360-text));
}
.y360-blog-subnav a.is-active,
.y360-blog-subnav a:hover {
  background: var(--y360-accent);
  color: #ffffff !important;
}

/* 5 mẫu bố cục Portal 2-3 cột */
.y360-portal-columns {
  display: grid;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.y360-portal-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 80px;
  min-width: 0;
}

.y360-preset-2col_narrow_wide .y360-portal-columns {
  grid-template-columns: 150px minmax(0, 1fr);
}
.y360-preset-2col_narrow_wide .y360-col-right {
  display: none;
}

.y360-preset-2col_wide_narrow .y360-portal-columns {
  grid-template-columns: minmax(0, 1fr) 150px;
}
.y360-preset-2col_wide_narrow .y360-col-left {
  display: none;
}

.y360-preset-3col_narrow_wide_narrow .y360-portal-columns {
  grid-template-columns: 150px minmax(0, 1fr) 150px;
}

.y360-preset-3col_narrow_narrow_wide .y360-portal-columns {
  grid-template-columns: 150px 150px minmax(0, 1fr);
}
.y360-preset-3col_narrow_narrow_wide .y360-col-left { order: 1; }
.y360-preset-3col_narrow_narrow_wide .y360-col-right { order: 2; }
.y360-preset-3col_narrow_narrow_wide .y360-col-main { order: 3; }

.y360-preset-3col_wide_narrow_narrow .y360-portal-columns {
  grid-template-columns: minmax(0, 1fr) 150px 150px;
}
.y360-preset-3col_wide_narrow_narrow .y360-col-main { order: 1; }
.y360-preset-3col_wide_narrow_narrow .y360-col-left { order: 2; }
.y360-preset-3col_wide_narrow_narrow .y360-col-right { order: 3; }

@media (max-width: 900px) {
  .y360-portal-columns {
    grid-template-columns: 1fr !important;
  }
  /* Mobile order: main -> left -> right */
  .y360-col-main { order: 1 !important; }
  .y360-col-left { order: 2 !important; }
  .y360-col-right { order: 3 !important; }
  .y360-portal-columns > .y360-portal-col { grid-column: auto !important; grid-row: auto !important; }
}

/* Module state: ẩn tiêu đề / ẩn khối / chế độ kéo thả Bố trí */
.y360-mod-edit-controls {
  display: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.y360-drag-grip {
  display: none;
  cursor: grab;
  margin-right: 4px;
  opacity: 0.85;
}
.y360-portal-module.is-title-hidden .rctop {
  display: none;
}
.y360-portal-module.is-module-hidden {
  display: none;
}

#blog-canvas.y360-edit-mode .y360-portal-module.is-title-hidden .rctop,
#blog-canvas.y360-edit-mode .y360-portal-module.is-module-hidden {
  display: flex;
  opacity: 0.68;
}
#blog-canvas.y360-edit-mode .y360-portal-module.is-module-hidden {
  display: block;
}
#blog-canvas.y360-edit-mode .y360-mod-edit-controls {
  display: inline-flex;
}
#blog-canvas.y360-edit-mode .y360-drag-grip {
  display: inline;
}
#blog-canvas.y360-edit-mode .y360-portal-module .rctop {
  cursor: grab;
  outline: 1px dashed rgba(91, 33, 182, 0.45);
}
#blog-canvas.y360-edit-mode .y360-portal-col,
#blog-canvas.y360-edit-mode .y360-portal-zone-top,
#blog-canvas.y360-edit-mode .y360-portal-zone-bottom {
  min-height: 90px;
  padding: 6px;
  border: 1.5px dashed rgba(91, 33, 182, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
}
.y360-portal-col.is-drop-over,
.y360-portal-zone-top.is-drop-over,
.y360-portal-zone-bottom.is-drop-over {
  border-color: #5b21b6 !important;
  background: rgba(139, 92, 246, 0.12) !important;
}
.y360-portal-module.is-dragging {
  opacity: 0.4;
}

.y360-layout-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #fef9c3;
  border: 1px solid #facc15;
  color: #422006;
}

.y360-mini-btn {
  padding: 2px 7px;
  font-size: 12px;
  border: 1px solid var(--y360-border);
  background: var(--y360-surface);
  color: var(--y360-text);
  border-radius: 3px;
  cursor: pointer;
}

.y360-highlight-star {
  color: #eab308;
  margin-right: 4px;
}
.y360-post-card.is-highlighted {
  border-left: 3px solid #eab308;
  padding-left: 10px;
  background: rgba(254, 249, 195, 0.35);
}

.y360-module-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.y360-module-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 13px;
}

.y360-report-bar {
  margin-top: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--y360-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--y360-muted);
}

/* Studio Tabs, Alert Warn, Live Preview, Block Editor */
.y360-studio-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--y360-border);
}
.y360-alert-warn {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
}
.y360-code-preview {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 260px;
}
.y360-live-preview-box {
  background: var(--blog-bg-color, #eef2f9);
  color: var(--blog-text-color, #1f2937);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--blog-border-color, #b9c9e4);
}
.y360-live-preview-box .y360-preview-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(var(--module-backdrop-blur, 0px));
  border: 1px solid var(--blog-border-color, #b9c9e4);
  border-radius: 4px;
  overflow: hidden;
}
.y360-live-preview-box .y360-preview-head {
  background: var(--module-title-color, #dde6f5);
  color: var(--module-title-text-color, #1e3a8a);
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
}
.y360-live-preview-box .y360-preview-body {
  padding: 10px;
  font-size: 13px;
}
.y360-live-preview-box a {
  color: var(--blog-link-color, #1d4ed8);
}

.y360-block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--y360-border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  background: var(--y360-surface-alt);
}
.y360-block-item {
  background: var(--y360-surface);
  border: 1px solid var(--y360-border);
  border-radius: 4px;
  padding: 8px;
}
.y360-block-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* Persistent Opt-In Ambient Audio Dock */
.y360-audio-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 280px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  z-index: 90;
  overflow: hidden;
  font-size: 12px;
}
.y360-audio-dock.is-minimized .y360-dock-body {
  display: none;
}
.y360-dock-head {
  background: linear-gradient(#2583ac, #1c6f94);
  color: #ffffff;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.y360-dock-min-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.y360-dock-body {
  padding: 10px;
}
.y360-dock-song {
  font-weight: 700;
  font-size: 13px;
}
.y360-dock-sub {
  color: #64748b;
  margin-bottom: 8px;
}
.y360-dock-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.y360-dock-status {
  color: #475569;
  font-size: 12px;
}
.y360-dock-viz {
  width: 100%;
  height: 28px;
  background: #f8fafc;
  border-radius: 4px;
}

/* Trả lời bình luận & album ảnh */
.y360-comment-reply { margin-left: 46px; }
.y360-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.y360-photo-grid figure { margin: 0; }
.y360-photo-grid img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; display: block; }
.y360-photo-grid figcaption { font-size: 12px; margin: 4px 0; overflow-wrap: anywhere; }
.y360-photo-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.y360-photo-thumbs:empty { display: none; }
.y360-photo-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

/* ===== Giao diện mặc định theo blog Yahoo! 360° Plus (đo từ bản lưu 2009, xem docs/research §3c) ===== */
.y360-topbar { background: none; padding: 0 16px; margin-top: 4px; }
.y360-topbar-inner, .y360-menubar { max-width: 920px; margin: 0 auto; }
.y360-topbar-inner { border-radius: 6px 6px 0 0; padding: 10px 10px 8px;
  background: radial-gradient(circle at 12% -40%, #5a5a60 0, transparent 45%), linear-gradient(#4a4a4e, #2a2a2d); }
.y360-menubar { border: 0; border-radius: 0 0 6px 6px; }
.y360-menubar .y360-container { padding: 0 10px; }
.y360-topbar a, .y360-greeting button { color: #6fa2b2; }
.y360-main { padding-top: 10px; }

.y360-box { border-radius: 5px; box-shadow: none; margin-bottom: 10px; }
.y360-box-head { padding: 7px 7px 3px; font-size: 13px; font-weight: 700; }
#blog-canvas .ycntmod .rctop { font-family: Arial, Helvetica, sans-serif; }
.y360-box-body { padding: 5px 7px 8px; overflow-wrap: anywhere; }
.y360-portal-columns { gap: 10px; margin-top: 0; }
.y360-portal-col { gap: 0; }
.y360-col-main .y360-box-head { font-size: 15px; }
.y360-btn { border-radius: 3px; font: 12px Arial, sans-serif; padding: 4px 10px; }
.y360-badge { border-radius: 2px; font-weight: 400; }
.y360-avatar-sm { border-radius: 0; }
.y360-gbtn { display: inline-block; background: linear-gradient(#f4f4f4, #d8d8d8); border: 1px solid #bbb; border-radius: 3px; padding: 2px 10px; font: 700 12px Arial, sans-serif; cursor: pointer; }
#blog-canvas a.y360-gbtn, #blog-canvas button.y360-gbtn { color: #555; }

/* Khung tên blog: nền xanh da trời, chữ nâu */
.y360-blog-banner { border-radius: 5px; box-shadow: none; padding: 4px; overflow: hidden; margin-bottom: 10px; }
.y360-blog-banner-bar { padding: 6px 8px; background: #c6ebff; color: #664c29; }
.y360-blog-banner-title { font: 400 15px Arial, Helvetica, sans-serif; color: #664c29; }
.y360-blog-banner-desc { margin: 2px 0 0; color: #664c29; font-size: 12px; }
.y360-blog-subnav { gap: 0; padding: 4px 8px 5px; background: #c6ebff; border: 0; }
.y360-blog-subnav a { padding: 0 8px; border-radius: 0; font: 12px Arial, sans-serif; border-right: 1px solid #7fb4d4; }
.y360-blog-subnav a:first-child { padding-left: 0; }
.y360-blog-subnav a:last-child { border-right: 0; }
#blog-canvas .y360-blog-subnav a { color: var(--blog-link-color, var(--y360-link)); }
#blog-canvas .y360-blog-subnav a.is-active, #blog-canvas .y360-blog-subnav a:hover { background: none; color: #664c29 !important; font-weight: 700; }

/* Cột trái: hồ sơ */
.y360-profile-card { text-align: center; }
.y360-profile-card .y360-avatar { display: block; width: 100%; max-width: 130px; height: auto; aspect-ratio: 1; margin: 6px auto; border-radius: 0; border: 1px solid #ccc; }
.y360-nick { font-weight: 400; }
.y360-profile-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; }

/* Blast: bong bóng trắng, đuôi trỏ về ảnh đại diện */
#blog-canvas [data-module-type="blast"] { overflow: visible; max-width: 360px; margin-left: -10px; }
[data-module-type="blast"] .y360-blast-banner { background: none; border: 0; margin: 0; padding: 0; }
[data-module-type="blast"] { position: relative; }
[data-module-type="blast"]::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; background: #fff; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc; transform: rotate(45deg); }

.y360-moods { display: flex; gap: 6px; overflow-x: auto; font-size: 20px; }
.y360-moods a:hover { text-decoration: none; }

.y360-bullets { margin: 0; padding-left: 14px; }
.y360-bullets li { margin-bottom: 3px; }
.y360-bullets li::marker { color: #999; }
.y360-cal-head { text-align: center; margin-bottom: 4px; }
.y360-cal { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; row-gap: 2px; }
.y360-cal .has-post { background: #c6ebff; font-weight: 700; color: #00b; }

.y360-entry-search { display: flex; justify-content: flex-end; gap: 4px; }
.y360-entry-search input { width: 150px; border: 1px solid #9ab; }
.y360-entry h3 { margin: 4px 0 10px; font-size: 15px; color: #664c29; }
#blog-canvas .y360-entry h3 a { color: #664c29; }
.y360-entry-mood { font-size: 20px; margin-right: 4px; }
.y360-entry-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.y360-entry-foot { text-align: right; font-size: 12px; }
.y360-pagebar { display: flex; justify-content: space-between; background: #e8e8e8; padding: 5px 8px; margin-top: 8px; }
.y360-col-main .y360-photo-thumbs { grid-template-columns: repeat(4, 1fr); }

/* Cột hẹp 150px */
.y360-col-left .y360-friends-grid, .y360-col-right .y360-friends-grid { grid-template-columns: 1fr 1fr; }
.y360-col-left form, .y360-col-right form { flex-wrap: wrap; }
.y360-col-left .y360-module-list li, .y360-col-right .y360-module-list li { font-size: 12px; }
#blog-canvas.y360-blog-canvas { padding: 0; }
@media (max-width: 900px) {
  #blog-canvas [data-module-type="blast"] { margin-left: 0; max-width: none; }
  [data-module-type="blast"]::before { display: none; }
}

/* Ẩn tiêu đề / gỡ module phải thắng quy tắc `#blog-canvas .ycntmod .rctop` */
#blog-canvas .ycntmod.y360-portal-module.is-title-hidden .rctop { display: none; }
#blog-canvas.y360-edit-mode .ycntmod.y360-portal-module .rctop { display: flex; flex-wrap: wrap; cursor: grab; }
#blog-canvas.y360-edit-mode .ycntmod.is-title-hidden .rctop { opacity: 0.7; }
#blog-canvas.y360-edit-mode .ycntmod.is-module-hidden { opacity: 0.5; }
#blog-canvas.y360-edit-mode [data-module-type="blast"] { margin-left: 0; }
.y360-mod-edit-controls form { display: inline; }
/* Thanh công cụ Bố trí ẩn/hiện bằng CSS: style gắn bằng JS bị hydration ghi đè */
#blog-canvas .y360-layout-toolbar { display: none; }
#blog-canvas.y360-edit-mode .y360-layout-toolbar { display: flex; }

/* ===== Nút và liên kết: một bộ trạng thái duy nhất =====
   Đặt cuối tệp, đủ mạnh để CSS trang trí của chủ blog không làm nút mất chữ. */
.y360-badge { font-size: 12px; }
.y360-main :is(.y360-btn, .y360-gbtn, .y360-mini-btn, .y360-tab-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; line-height: 1.35;
  border: 1px solid; border-radius: 3px; cursor: pointer; text-decoration: none; text-shadow: none;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.y360-main :is(.y360-btn, .y360-gbtn, .y360-mini-btn, .y360-tab-link):hover { text-decoration: none; text-shadow: none; }
.y360-main :is(.y360-btn, .y360-gbtn, .y360-mini-btn, .y360-tab-link):active { transform: translateY(1px); }
/* chính */
.y360-main .y360-btn:not(.y360-btn-secondary, .y360-btn-danger),
.y360-main .y360-tab-link.is-active { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-main .y360-btn:not(.y360-btn-secondary, .y360-btn-danger):hover,
.y360-main .y360-tab-link.is-active:hover { background: #134874; border-color: #0f3a5e; color: #fff; }
/* phụ */
.y360-main :is(.y360-btn.y360-btn-secondary, .y360-gbtn, .y360-mini-btn, .y360-tab-link:not(.is-active)) {
  background: linear-gradient(#fdfdfd, #e6e6e6); border-color: #b4b4b4; color: #333;
}
.y360-main :is(.y360-btn.y360-btn-secondary, .y360-gbtn, .y360-mini-btn, .y360-tab-link:not(.is-active)):hover {
  background: linear-gradient(#fff6e0, #ffe3a3); border-color: #d99a1e; color: #3a2600;
}
/* nguy hiểm */
.y360-main .y360-btn.y360-btn-danger { background: #c62828; border-color: #a11f1f; color: #fff; }
.y360-main .y360-btn.y360-btn-danger:hover { background: #9b1c1c; border-color: #7f1616; color: #fff; }
/* thanh đầu trang */
.y360-search button:hover { background: linear-gradient(#ffd27a, #ff9d17); }
.y360-topbar .y360-greeting button:hover, .y360-topbar a:hover { color: #fff; text-decoration: underline; }
.y360-topbar .y360-nav a:hover { text-decoration: none; }
.y360-dock-min-btn:hover { background: rgba(255,255,255,.38); }
.y360-main a.y360-badge:hover { text-decoration: underline; }
/* điều hướng trong blog: đậm sẵn nên rê chuột không làm xê dịch chữ */
#blog-canvas .y360-blog-subnav a { font-weight: 700; }
#blog-canvas .y360-blog-subnav a:hover { text-decoration: underline; }
:is(.y360-main, .y360-topbar, .y360-audio-dock) :is(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid #f08a00; outline-offset: 1px; }
.y360-main :is(button, .y360-btn):disabled { opacity: .55; cursor: not-allowed; }
.y360-photo-grid a:hover img, .y360-friend-tile:hover img { filter: brightness(1.08); }

.y360-main small, .y360-footer, .y360-footer * { font-size: 12px; }
.y360-main .y360-editor-toolbar button:hover { background: #fff1cc; border-color: #d99a1e; color: #3a2600; }
.y360-dock-head .y360-dock-min-btn:hover { background: rgba(255, 255, 255, .42); }

/* ===== Co giãn theo màn hình =====
   Bản gốc thiết kế cho 1024–1366px. Màn hình lớn hơn: nới khung rồi phóng đều cả chữ, ảnh, nút.
   --y360-zoom là mức phóng; khung rộng tối đa 1400px. */
:root { --y360-w: 920px; --y360-side: 150px; --y360-zoom: 1; }
@media (min-width: 1180px) { :root { --y360-w: 960px; --y360-side: 160px; --y360-zoom: 1.12; } }
@media (min-width: 1366px) { :root { --y360-w: 1000px; --y360-side: 170px; --y360-zoom: 1.18; } }
@media (min-width: 1580px) { :root { --y360-w: 1060px; --y360-side: 180px; --y360-zoom: 1.28; } }
/* Trần 1400px: 1090 × 1.28 ≈ 1395px, màn rộng hơn giữ nguyên cỡ này. */
@media (min-width: 1800px) { :root { --y360-w: 1090px; --y360-side: 185px; } }
.y360-shell, .y360-audio-dock { zoom: var(--y360-zoom); }
.y360-shell { min-height: calc(100vh / var(--y360-zoom)); }
.y360-container { max-width: calc(var(--y360-w) + 32px); }
.y360-topbar-inner, .y360-menubar { max-width: var(--y360-w); }
@media (min-width: 901px) {
  /* Menu và ô tìm chung một hàng: nút gọn lại, ô tìm co theo chỗ còn thừa. */
  /* Ô tìm cao hơn chữ menu: cho nút menu cao bằng cả thanh để không hở đáy. */
  .y360-menubar .y360-nav { align-self: stretch; }
  .y360-topbar .y360-nav a { display: flex; align-items: center; padding-inline: 9px; }
  .y360-menubar .y360-search { flex: 1 1 120px; min-width: 0; justify-content: flex-end; }
  .y360-menubar .y360-search input { flex: 0 1 180px; min-width: 0; width: 180px; }
  .y360-preset-2col_narrow_wide .y360-portal-columns { grid-template-columns: var(--y360-side) minmax(0, 1fr); }
  .y360-preset-2col_wide_narrow .y360-portal-columns { grid-template-columns: minmax(0, 1fr) var(--y360-side); }
  .y360-preset-3col_narrow_wide_narrow .y360-portal-columns { grid-template-columns: var(--y360-side) minmax(0, 1fr) var(--y360-side); }
  .y360-preset-3col_narrow_narrow_wide .y360-portal-columns { grid-template-columns: var(--y360-side) var(--y360-side) minmax(0, 1fr); }
  .y360-preset-3col_wide_narrow_narrow .y360-portal-columns { grid-template-columns: minmax(0, 1fr) var(--y360-side) var(--y360-side); }
}
.y360-profile-card .y360-avatar { max-width: calc(var(--y360-side) - 20px); }
/* điện thoại: chữ to hơn một chút, ô nhập đủ 16px để iOS không tự phóng */
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .y360-main :is(input, select, textarea), .y360-search input { font-size: 16px; }
  .y360-main :is(.y360-btn, .y360-gbtn, .y360-mini-btn, .y360-tab-link) { min-height: 32px; }
  .y360-audio-dock { width: min(280px, calc(100vw - 32px)); }
}

/* ===== Trang Cộng đồng (theo trang chủ 360° Plus 2009) ===== */
.y360-community-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; }
.y360-community-search label { font-weight: 700; }
.y360-community-search input { flex: 0 1 360px; min-width: 160px; width: auto; }
.y360-community-search select { width: auto; }
.y360-community { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; align-items: start; }
@media (max-width: 760px) { .y360-community { grid-template-columns: 1fr; } }
.y360-result { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #ddd; }
.y360-result img { width: 52px; height: 52px; object-fit: cover; }
.y360-result small, .y360-blogger small { display: block; color: #666; }
.y360-daily { position: relative; }
.y360-daily-radio { position: absolute; opacity: 0; pointer-events: none; }
.y360-daily-slide { display: none; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; min-height: 150px; }
.y360-daily-slide img { width: 100%; height: 150px; object-fit: cover; border: 1px solid #ccc; display: block; }
.y360-daily-slide h2 { margin: 0 0 6px; font-size: 17px; }
@media (max-width: 600px) { .y360-daily-slide { grid-template-columns: 1fr; } }
.y360-daily-pages { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.y360-daily-pages label { min-width: 26px; text-align: center; padding: 2px 6px; border: 1px solid #bbb; border-radius: 3px; background: #eee; cursor: pointer; font-weight: 700; }
.y360-daily-pages label:hover { background: #ffe3a3; border-color: #d99a1e; }
/* Chuyển trang bằng radio thuần CSS */
.y360-daily:has(.y360-daily-r1:checked) .y360-daily-s1 { display: grid; }
.y360-daily:has(.y360-daily-r1:checked) .y360-daily-l1 { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-daily:has(.y360-daily-r1:focus-visible) .y360-daily-l1 { outline: 2px solid #f08a00; }
.y360-daily:has(.y360-daily-r2:checked) .y360-daily-s2 { display: grid; }
.y360-daily:has(.y360-daily-r2:checked) .y360-daily-l2 { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-daily:has(.y360-daily-r2:focus-visible) .y360-daily-l2 { outline: 2px solid #f08a00; }
.y360-daily:has(.y360-daily-r3:checked) .y360-daily-s3 { display: grid; }
.y360-daily:has(.y360-daily-r3:checked) .y360-daily-l3 { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-daily:has(.y360-daily-r3:focus-visible) .y360-daily-l3 { outline: 2px solid #f08a00; }
.y360-daily:has(.y360-daily-r4:checked) .y360-daily-s4 { display: grid; }
.y360-daily:has(.y360-daily-r4:checked) .y360-daily-l4 { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-daily:has(.y360-daily-r4:focus-visible) .y360-daily-l4 { outline: 2px solid #f08a00; }
.y360-daily:has(.y360-daily-r5:checked) .y360-daily-s5 { display: grid; }
.y360-daily:has(.y360-daily-r5:checked) .y360-daily-l5 { background: #1c5f9e; border-color: #174f84; color: #fff; }
.y360-daily:has(.y360-daily-r5:focus-visible) .y360-daily-l5 { outline: 2px solid #f08a00; }
.y360-bloggers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.y360-blogger { display: flex; gap: 10px; align-items: flex-start; }
.y360-blogger img { width: 64px; height: 64px; object-fit: cover; border: 1px solid #ccc; }
.y360-main a.y360-blogger:hover, .y360-main a.y360-result:hover { background: #fff8e6; text-decoration: none; }
.y360-latest { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #ddd; }
.y360-latest:last-child, .y360-notice:last-child { border-bottom: 0; }
/* Ảnh trong hàng flex không được co theo độ dài chữ bên cạnh. */
.y360-latest > a, .y360-blogger img, .y360-result img { flex: none; }
.y360-latest h3 { margin: 2px 0; font-size: 14px; }
.y360-latest p, .y360-notice p { margin: 2px 0; }
.y360-notice { padding: 6px 0; border-bottom: 1px dashed #ddd; }
.y360-topic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; text-align: center; }
.y360-topic img { width: 52px; height: 52px; object-fit: cover; border: 1px solid #ccc; display: block; margin: 0 auto 2px; }
.y360-topic span { font-size: 12px; overflow-wrap: anywhere; }

/* Logo đặt trong Admin → Thiết lập → Thương hiệu. */
.y360-brand-logo { display: block; max-height: 36px; max-width: 220px; }

/* Chân trang: thông tin doanh nghiệp, liên hệ, liên kết (Admin → Thiết lập). */
.y360-footer-site { display: flex; flex-wrap: wrap; gap: 6px 32px; }
.y360-footer-site:not(:has(> address, a)) { display: none; }
.y360-footer-site address { display: flex; flex-direction: column; font-style: normal; text-align: left; }
.y360-footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; align-content: flex-start; }

/* Nội dung người dùng viết: trả lại kiểu chữ mà reset CSS đã xóa. :where() để theme riêng của blog vẫn đè được. */
:where(.y360-prose) :where(p, ul, ol, blockquote, pre, table, figure) { margin: 0 0 .7em; }
:where(.y360-prose) :where(h1, h2, h3, h4) { font-weight: 700; line-height: 1.35; margin: 1em 0 .4em; }
:where(.y360-prose) :where(h1) { font-size: 1.5em; }
:where(.y360-prose) :where(h2) { font-size: 1.3em; }
:where(.y360-prose) :where(h3) { font-size: 1.15em; }
:where(.y360-prose) :where(ul) { list-style: disc; padding-left: 1.6em; }
:where(.y360-prose) :where(ol) { list-style: decimal; padding-left: 1.6em; }
:where(.y360-prose) :where(blockquote) { border-left: 3px solid #bbb; padding: .2em 0 .2em .9em; color: #555; }
:where(.y360-prose) :where(a) { text-decoration: underline; }
:where(.y360-prose) :where(img) { max-width: 100%; height: auto; }
:where(.y360-prose) :where(pre) { overflow-x: auto; background: #f4f4f4; padding: .6em; }
:where(.y360-prose) :where(hr) { margin: 1em 0; border: 0; border-top: 1px solid #ccc; }
:where(.y360-prose) > :where(:last-child) { margin-bottom: 0; }

/* ===== Một kiểu chung cho ô nhập, ô chọn và nút =====
   Cùng chiều cao, cỡ chữ, font, bo góc; đệm ngang 8px cho ô, 12px cho nút (nút nhỏ trên thanh module: 8px). */
:root { --y360-ctl: 28px; --y360-ctl-mini: 24px; --y360-ctl-fs: 12px; --y360-ctl-radius: 3px; --y360-ctl-font: Arial, Helvetica, sans-serif; }
.y360-shell :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea,
    .y360-btn, .y360-gbtn, .y360-tab-link, .y360-mini-btn, .y360-search button, .y360-editor-toolbar button) {
  box-sizing: border-box; font-family: var(--y360-ctl-font); font-size: var(--y360-ctl-fs); border-radius: var(--y360-ctl-radius);
}
.y360-shell :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, .y360-btn, .y360-gbtn, .y360-tab-link,
    .y360-search button, .y360-editor-toolbar button) {
  height: var(--y360-ctl); min-height: var(--y360-ctl); padding-top: 0; padding-bottom: 0; line-height: normal; vertical-align: middle; white-space: nowrap;
}
.y360-shell :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea) { padding-left: 8px; padding-right: 8px; }
.y360-shell select:is(select) { padding-left: 4px; padding-right: 4px; max-width: 100%; text-overflow: ellipsis; }
.y360-shell textarea:is(textarea) { padding-top: 6px; padding-bottom: 6px; line-height: 1.5; }
.y360-shell :is(.y360-btn, .y360-gbtn, .y360-tab-link, .y360-search button, .y360-editor-toolbar button) { padding-left: 12px; padding-right: 12px; font-weight: 700; }
.y360-shell :is(a.y360-btn, a.y360-gbtn, a.y360-tab-link, summary.y360-btn) { line-height: calc(var(--y360-ctl) - 2px); }
.y360-shell input:is([type="file"]) { padding: 2px 4px; line-height: normal; }
.y360-shell input:is([type="color"]) { padding: 2px; }
.y360-shell .y360-mini-btn:is(.y360-mini-btn) { height: var(--y360-ctl-mini); min-height: var(--y360-ctl-mini); padding: 0 8px; line-height: normal; font-weight: 400; vertical-align: middle; white-space: nowrap; }
.y360-shell :is(a, label).y360-mini-btn:is(.y360-mini-btn) { display: inline-block; line-height: calc(var(--y360-ctl-mini) - 2px); }
/* Ô mã nguồn giữ font đơn cách. */
.y360-shell textarea:is(#raw-custom-css, .y360-code) { font-family: Consolas, "Courier New", monospace; }
/* Điện thoại: cao hơn cho dễ bấm; chữ trong ô nhập 16px để iOS không tự phóng. */
@media (max-width: 600px) {
  :root { --y360-ctl: 36px; --y360-ctl-mini: 32px; }
  .y360-shell :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select:is(select), textarea:is(textarea)) { font-size: 16px; }
  .y360-community-search input { flex: 1 1 100%; }
}

/* ===== Kho giao diện, xem thử và trang hướng dẫn CSS ===== */
.y360-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.y360-gallery > .y360-box { margin: 0; }
.y360-theme-card h2 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.y360-theme-card p { margin: 0 0 8px; min-height: 3em; }
.y360-theme-card summary { cursor: pointer; margin-top: 8px; }
.y360-theme-mock { display: grid; grid-template-columns: 1fr 2.4fr 1fr; grid-template-rows: 54px 62px; gap: 6px; padding: 8px; border-radius: 6px 6px 0 0; }
.y360-theme-mock-head { grid-column: 1 / -1; width: 100%; height: 54px; object-fit: cover; object-position: center bottom; border-radius: 4px; }
.y360-theme-mock-side, .y360-theme-mock-main { display: flex; flex-direction: column; gap: 5px; background: rgba(255,255,255,.9); border-radius: 4px; padding: 0 0 5px; overflow: hidden; }
.y360-theme-mock i { display: block; height: 12px; }
.y360-theme-mock b { display: block; height: 6px; margin: 0 8px; border-radius: 3px; background: #c9c9c9; }
.y360-theme-mock b:first-of-type { width: 55%; }
.y360-theme-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.y360-textarea.y360-code { font-family: Consolas, "Courier New", monospace; }
.y360-preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 10px; background: #fff6cc; border: 1px solid #d9a600; border-radius: 4px; color: #3a2e00; font: 13px Arial, sans-serif; }
.y360-preview-bar > span { margin-right: auto; }
.y360-preview-warnings { flex-basis: 100%; margin: 0; padding-left: 18px; list-style: disc; font-size: 12px; color: #8a3b00; }
.y360-guide table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.y360-guide th, .y360-guide td { border: 1px solid #ccc; padding: 4px 8px; text-align: left; vertical-align: top; }
.y360-guide th { background: #f1f1f1; }
.y360-guide code { font-family: Consolas, "Courier New", monospace; background: #f4f4f4; padding: 0 3px; border-radius: 2px; overflow-wrap: anywhere; }
.y360-guide pre code { background: none; padding: 0; overflow-wrap: normal; }
.y360-guide blockquote { background: #fff9e6; }
.y360-muted { color: var(--y360-muted); }

/* Thanh cuối blog: nằm ngoài CSS riêng (để luôn báo cáo được) nên chỉ làm nhẹ cho hợp mọi nền. */
.y360-report-bar { background: rgba(255, 255, 255, 0.78); border-color: rgba(0, 0, 0, 0.08); color: #555; font-size: 12px; }

/* Trang hướng dẫn CSS: bề ngang vừa đọc, mỗi đoạn mã có nút sao chép. */
.y360-guide { max-width: 760px; }
.y360-guide h2 { margin-top: 1.8em; padding-bottom: 4px; border-bottom: 2px solid #1c5f9e; }
.y360-guide img { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 0 .8em; }
.y360-code-block { margin: 0 0 1em; border: 1px solid #ccd6e0; border-radius: 4px; background: #f6f8fa; }
.y360-code-block .y360-btn { float: right; margin: 6px 6px 0 8px; }
.y360-code-block pre { margin: 0; background: none; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; }

/* ===== Trang chính: bảng tin của thành viên và trang giới thiệu cho khách ===== */
.y360-home { display: grid; grid-template-columns: 220px minmax(0, 1fr) 250px; gap: 10px; align-items: start; }
.y360-home > * { min-width: 0; }
@media (max-width: 900px) { .y360-home { grid-template-columns: 1fr; } .y360-home-main { order: -1; } }
.y360-me { display: flex; gap: 10px; align-items: center; }
.y360-me img { flex: none; }
.y360-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; text-align: center; }
.y360-stats a { border: 1px solid #ddd; border-radius: 3px; padding: 5px 2px; }
.y360-stats strong { display: block; font-size: 16px; }
.y360-stats span { color: #666; }
.y360-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.y360-home-friends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.y360-home-friends img { width: 48px; height: 48px; object-fit: cover; border: 1px solid #ccc; }
.y360-home-friends span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y360-activity { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed #ddd; }
.y360-activity:last-child { border-bottom: 0; }
.y360-activity img { flex: none; width: 36px; height: 36px; object-fit: cover; border: 1px solid #ccc; }
.y360-activity span { min-width: 0; overflow-wrap: anywhere; }
.y360-activity small { display: block; color: #666; }
.y360-main a.y360-activity:hover, .y360-main .y360-stats a:hover, .y360-main .y360-samples a:hover { background: #fff8e6; text-decoration: none; }
.y360-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px; align-items: center; padding: 18px; }
.y360-hero h1 { margin: 0 0 8px; font-size: 24px; color: #1d5296; }
.y360-hero p { font-size: 13.5px; }
.y360-hero img { width: 100%; height: auto; }
.y360-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.y360-features .y360-box { margin: 0; }
.y360-samples { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; text-align: center; }
.y360-samples a { padding: 4px; }
.y360-samples img { width: 100%; height: 64px; object-fit: cover; border: 1px solid #ccc; }
.y360-samples span { display: block; }
@media (max-width: 760px) {
  .y360-hero { grid-template-columns: 1fr; }
  .y360-features { grid-template-columns: 1fr 1fr; }
  .y360-samples { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== Thông báo, mặt cười, nút ở danh sách bạn ===== */
.y360-count { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 4px; border-radius: 8px; background: #ff9d17; color: #2a1800; font-size: 11px; line-height: 16px; text-align: center; }
.y360-activity.is-new { background: #fff8e6; }
.y360-activity .y360-badge { margin-left: 6px; }
.y360-emo { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0; max-height: 96px; overflow-y: auto; }
.y360-shell .y360-emo button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 2px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; }
.y360-shell .y360-emo button:hover, .y360-shell .y360-emo button:focus-visible { border-color: #ffb52e; background: #fff8e6; }
/* Mặt cười luôn giữ cỡ gốc, không nhận khung hay cỡ dành cho ảnh (kể cả CSS của blog). */
.y360-shell img.y360-smiley, .y360-shell .y360-emo img { display: inline !important; width: auto !important; height: auto !important; max-width: none !important; margin: 0 1px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; vertical-align: middle; }
.y360-friend-actions, .y360-friend-actions form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.y360-friend-actions select { width: auto; }

/* ===== Video, trích dẫn, ảnh ===== */
.y360-video { display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; margin: 8px 0; }
.y360-video iframe { width: 100%; height: 100%; border: 0; }
.y360-quote-source { padding: 6px 10px; border-left: 3px solid #ccc; color: #666; }
.y360-hint { margin: 4px 0; color: #666; }
.y360-photo-large { margin: 0 0 10px; text-align: center; }
.y360-photo-large img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.y360-album-access { margin-bottom: 12px; }
.y360-album-access form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.y360-album-access select { width: auto; }

/* ===== Nhóm, đánh giá, trực tuyến ===== */
.y360-subtabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.y360-inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.y360-inline-form .y360-input { flex: 0 1 320px; width: auto; }
.y360-badge.is-active { background: #ffb52e; color: #2a1800; }
.y360-stars { color: #e68a00; letter-spacing: 1px; white-space: nowrap; }
.y360-online { color: #15803d; font-weight: 700; font-size: 11px; }
.y360-online::before, .y360-home-friends a.is-online span::before { content: '● '; color: #22c55e; }

/* ===== Màu cho các trang chung (không đụng trang blog: ở đó theme và CSS của chủ blog quyết định) =====
   Một tông duy nhất, đo từ ảnh chụp giao diện mặc định 360 Plus tháng 4/2008:
   đầu khung xanh nhạt #c8d9e8, thân #edf2f5, thanh nhấn xanh thép #5c84a8, chữ xanh đậm. */
.y360-shell:not(:has(#blog-canvas)) { background: #f1f5f8; }
.y360-shell:not(:has(#blog-canvas)) .y360-box { background: #edf2f5; border-color: #c3d3e0; border-radius: 3px; box-shadow: none; }
.y360-shell:not(:has(#blog-canvas)) .y360-box-head { background: #c8d9e8; color: #2f5578; padding: 6px 9px; border-bottom: 1px solid #b5c9da; margin-bottom: 3px; }
.y360-stats a { background: #fff; border-color: #c3d3e0; }
.y360-shell:not(:has(#blog-canvas)) .y360-hero { background: #5c84a8; border-color: #4d7395; color: #fff; }
.y360-shell:not(:has(#blog-canvas)) .y360-hero :is(h1, h2, p) { color: #fff; }
.y360-shell:not(:has(#blog-canvas)) .y360-footer { background: #fff; }

/* ===== Trang viết bài và thiết lập theo ảnh chụp 360 Plus 2008 ===== */
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write { border-color: #bbb; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write > .y360-box-head { background: linear-gradient(#a8a8a8, #6f6f6f); color: #fff; font-size: 19px; padding: 9px 12px; border-color: #666; margin: 0; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 12px; padding-right: 10px; margin: 0; border-bottom: 1px dashed #bbb; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field > label { margin: 0; padding: 12px 12px 12px 6px; text-align: right; background: linear-gradient(90deg, #fff, #ececec); }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field > :not(label:first-child) { margin: 8px 0; min-width: 0; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-btn { margin-top: 12px; }
.y360-moods { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.y360-field .y360-moods label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.y360-settings { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: start; }
.y360-setnav { background: #fff; border: 1px solid #ccc; border-radius: 6px; padding: 3px; }
.y360-setnav div { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.y360-setnav div:first-child { background: #a9eedc; }
.y360-setnav div:last-child { background: #eee; }
.y360-setnav a::before { content: "• "; }
.y360-setnav a[aria-current="page"] { color: #555; font-weight: 700; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-green .y360-box { border-color: #ccc; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-green .y360-box > .y360-box-head { background: #009d74; color: #fff; font-size: 15px; padding: 9px 12px; border-color: #00805f; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-green .y360-box-body h3 { background: #c4c4c4; color: #444; padding: 6px 9px; font-size: 13px; }
.y360-shell:not(:has(#blog-canvas)) .y360-classic-green .y360-box .y360-box > .y360-box-head { background: #c4c4c4; color: #444; }
@media (max-width: 720px) {
  .y360-settings { grid-template-columns: minmax(0, 1fr); }
  .y360-setnav { display: grid; grid-template-columns: 1fr 1fr; }
  .y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
  .y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field > label { text-align: left; padding: 6px 8px; }
  .y360-shell:not(:has(#blog-canvas)) .y360-classic-write form > .y360-field > :not(label:first-child) { margin: 8px 8px; }
}

/* ===== Hộp thoại Bố trí kiểu 360 Plus: thanh đen chấm vàng, thân xanh nhạt, chân xám đậm ===== */
#blog-canvas .y360-layout-toolbar { background: linear-gradient(#55555a, #1f1f21); border: 1px solid #000; color: #fff; }
#blog-canvas .y360-dlg-title::before, #blog-canvas .y360-dlg-head span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 7px; border-radius: 50%; background: #ffc400; }
#blog-canvas .y360-dlg { inset: 0; margin: auto; height: fit-content; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid #000; border-radius: 6px; background: #bfe6fb; color: #333; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); overflow: auto; }
#blog-canvas .y360-dlg::backdrop { background: rgba(0, 0, 0, .45); }
#blog-canvas .y360-dlg-head, #blog-canvas .y360-dlg-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(#606064, #222224); color: #fff; }
#blog-canvas .y360-dlg-head { justify-content: space-between; font-weight: 700; }
#blog-canvas .y360-dlg-head button { background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; }
#blog-canvas .y360-dlg-foot { justify-content: flex-end; font-size: 12px; }
#blog-canvas .y360-dlg-foot span { margin-right: auto; }
#blog-canvas .y360-dlg-foot button { background: linear-gradient(#f4f4f4, #bbb); border: 1px solid #777; border-radius: 3px; color: #222; font: 700 12px Arial, sans-serif; padding: 5px 16px; cursor: pointer; }
#blog-canvas .y360-dlg-body { display: grid; gap: 8px; margin: 10px; padding: 12px; background: #fff; border-radius: 4px; }
#blog-canvas .y360-dlg-body p { margin: 0; }
.y360-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.y360-presets label { display: grid; gap: 6px; align-content: space-between; font-size: 12px; cursor: pointer; }
.y360-thumb { display: grid; gap: 4px; height: 76px; padding: 18px 5px 5px; border: 1px solid #999; background: linear-gradient(#6a9a98 13px, #fff 13px); }
.y360-thumb i { background: #fdebd0; border: 1px solid #e2b877; }
.y360-thumb-2col_narrow_wide { grid-template-columns: 1fr 2.4fr; }
.y360-thumb-2col_wide_narrow { grid-template-columns: 2.4fr 1fr; }
.y360-thumb-3col_narrow_wide_narrow { grid-template-columns: 1fr 2.2fr 1fr; }
.y360-thumb-3col_narrow_narrow_wide { grid-template-columns: 1fr 1fr 2.2fr; }
.y360-thumb-3col_wide_narrow_narrow { grid-template-columns: 2.2fr 1fr 1fr; }
[class*="y360-thumb-2col"] i:nth-child(3) { display: none; }
.y360-theme-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; text-align: center; }
.y360-theme-choices a { display: grid; gap: 6px; justify-items: center; align-content: start; padding: 12px; border: 1px solid transparent; border-radius: 4px; color: #333; text-decoration: none; }
.y360-theme-choices a:hover, .y360-theme-choices a:focus-visible { border-color: #5aa9d6; background: #eef8ff; }
.y360-theme-choices b { font-size: 44px; line-height: 1.2; }
.y360-theme-choices span { font-size: 12px; color: #666; }
.y360-zonemap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; border: 1px solid #999; box-shadow: 2px 2px 0 #999; }
.y360-zonemap label { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 62px; background: #fdebd0; border: 1px solid #e2b877; font-size: 12px; text-align: center; cursor: pointer; }
.y360-zonemap .is-top, .y360-zonemap .is-bottom { grid-column: 1 / -1; min-height: 30px; }
.y360-zonemap label:has(:checked) { background: #ffd58c; border-color: #c97f00; font-weight: 700; }
